Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Property

Default

Notes

offset

 

a float value in the range [0..1]

color

 

a Color or a color string

opacity

 

must be in the range [0..1]

Example

Code Block
def stops = {
   def offsets = [0,0.5,1]
   def colors = ['black','red','blue']
   (0..2).each{ stop( offset: offsets[it], color: colors[it] ) }
}
rect( x: 0, y: 0, width: 100, height: 100 ){
   radialGradient( cx: 25, cy: 25, radius: 75 ){ stops() }
}
rect( x: 25, y: 100, width: 100, height: 100 ){
   radialGradient( cx: 25, cy: 125, radius: 75, absolute: true ){ stops() }
}

...