@file:Suppress("RUNTIME_ANNOTATION_NOT_SUPPORTED") package org.openrndr.extra.shadestyles import org.openrndr.color.ColorRGBa import org.openrndr.draw.ShadeStyle import org.openrndr.extra.parameters.Description import org.openrndr.math.Vector2 @Deprecated("use gradient {} instead") @Description("N-Point gradient") class NPointGradient( colors: Array, points: Array = arrayOf(Vector2.ZERO)) : ShadeStyle() { var colors: Array by Parameter() var points: Array by Parameter() init { this.colors = colors this.points = points fragmentTransform = """ float sum = 0; vec4 rgba = vec4(0.0); for(int i=0; i