LinearGradientFill
Kind: class
In a linear gradient, colors blend smoothly along a straight line, extending out perpendicularly from that line. The gradient fills the entire area of the shape it is applied to.
- LinearGradientFill
- new LinearGradientFill()
- .clone() ⇒
!LinearGradientFill
- .colorStops :
!Array<{stop:number, color:!Color}>
- .startX :
number
- .startY :
number
- .endX :
number
- .endY :
number
- .getEndPoints() ⇒
!Array<number>
- .setEndPoints(startX, startY, endX, endY)
new LinearGradientFill()
Create a new LinearGradientFill instance.
linearGradientFill.clone() ⇒ !LinearGradientFill
Returns a copy of this instance.
Kind: instance method of LinearGradientFill
linearGradientFill.colorStops : !Array<{stop:number, color:!Color}>
Array of objects representing each color and its position along the gradient line. The position (stop
value) is a number 0.0 - 1.0.
Kind: instance property of LinearGradientFill
linearGradientFill.startX : number
X position of the start of the gradient line, as a multiple of the object's bounding box: X=0 indicates the left edge of the bounding box and X=1 indicates the right edge. The gradient line may start or end outside the object's bounding box, so values may be < 0 or > 1.
Kind: instance property of LinearGradientFill
linearGradientFill.startY : number
Y position of the start of the gradient line, as a multiple of the object's bounding box: Y=0 indicates the top edge of the bounding box and Y=1 indicates the bottom edge. The gradient line may start or end outside the object's bounding box, so values may be < 0 or > 1.
Kind: instance property of LinearGradientFill
linearGradientFill.endX : number
X position of the end of the gradient line, as a multiple of the object's bounding box: X=0 indicates the left edge of the bounding box and X=1 indicates the right edge. The gradient line may start or end outside the object's bounding box, so values may be < 0 or > 1.
Kind: instance property of LinearGradientFill
linearGradientFill.endY : number
Y position of the end of the gradient line, as a multiple of the object's bounding box: Y=0 indicates the top edge of the bounding box and Y=1 indicates the bottom edge. The gradient line may start or end outside the object's bounding box, so values may be < 0 or > 1.
Kind: instance property of LinearGradientFill
linearGradientFill.getEndPoints() ⇒ !Array<number>
Returns an array of [startX, startY, endX, endY].
Kind: instance method of LinearGradientFill
*linearGradientFill.setEndPoints(startX, startY, endX, endY)
Shorthand for setting all four start/endpoint properties.
Kind: instance method of LinearGradientFill