Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Creates a linear gradient of many colors.

Requires graphicsbuilder-ext-jdk6 and Java6+.

Properties

Property

Default

Notes

x1

0

 

y1

0

 

x2

100

 

y2

0

 

cycle

'nocycle'

value must be any of ['nocycle','reflect','repeat] or any MultipleGradientPaint.CycleMethod

stretch

false

Scales the gradient to fit the Shape's bounds

fit

true

Scales the gradient retaining the aspect ratio

stops

[]

must define at least two stops

linkTo

 

a reference to a linearGradient or a radialGradient

If linkTo is used, then this gradient will reuse the referenced one's stops, new stops may be added to this gradient though.

Stops

Property

Default

Notes

offset

 

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

color

 

a Color or a color string

Example

4 rectangles, each one with a diagonal gradient

Different settings for fit, stretch and cycle

 

  • No labels