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 offset
number 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 clr
Array.<(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 x0
number Start position x coordinate. y0
number Start position y coordinate. x1
number End position x coordinate. y1
number End position y coordinate. - Source:
- fill/lineargradient.js, line 44
Returns:
object itself. -
setDOMStyle()
-
- Source:
- fill/lineargradient.js, line 77