new lime.fill.LinearGradient()
Linear gradient fill.
- Source:
- fill/lineargradient.js, line 10
Extends
Summary
Members |
||
|---|---|---|
id :string
Common name for Lineargradient objects
|
||
Methods |
||
|---|---|---|
addColorStop(offset, color) → {lime.fill.LinearGradient}
Add color stop to the gradient. Accepts same format as node.setFill().
|
||
| <private> |
formatColorStop_(clr) → {string}
Format color stop string for current browser
|
|
initForSprite()
|
||
setCanvasStyle()
|
||
setDirection(x0, y0, x1, y1) → {lime.fill.LinearGradient}
Set direction of the gradient by defining start and endpoint
locations as vectors from top-left corner to bottom-right.
|
||
setDOMStyle()
|
||
Members
-
id :string
-
Common name for Lineargradient objects
- Source:
- fill/lineargradient.js, line 23
Methods
-
addColorStop(offset, color) → {lime.fill.LinearGradient}
-
Add color stop to the gradient. Accepts same format as node.setFill().
Parameters:
Name Type Description offsetnumber Position of color [0-1]. color* Color value. - Source:
- fill/lineargradient.js, line 56
Returns:
object itself. -
<private> formatColorStop_(clr) → {string}
-
Format color stop string for current browser
Parameters:
Name Type Description clrArray.<(number|lime.fill.Fill)> Color in format [offset,color]. - Source:
- fill/lineargradient.js, line 69
Returns:
Color stop CSS string.- Type
- string
-
initForSprite()
-
- Source:
- fill/lineargradient.js, line 28
-
setCanvasStyle()
-
- Source:
- fill/lineargradient.js, line 133
-
setDirection(x0, y0, x1, y1) → {lime.fill.LinearGradient}
-
Set direction of the gradient by defining start and endpoint locations as vectors from top-left corner to bottom-right.
Parameters:
Name Type Description x0number Start position x coordinate. y0number Start position y coordinate. x1number End position x coordinate. y1number End position y coordinate. - Source:
- fill/lineargradient.js, line 44
Returns:
object itself. -
setDOMStyle()
-
- Source:
- fill/lineargradient.js, line 77