Class lime.fill.LinearGradient
Extends
lime.fill.Fill.
Defined in: lineargradient.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Linear gradient fill.
|
| Field Attributes | Field Name and Description |
|---|---|
|
Common name for Lineargradient objects
|
| Method Attributes | Method Name and Description |
|---|---|
|
addColorStop(offset, color)
Add color stop to the gradient.
|
|
| <private> |
formatColorStop_(clr)
Format color stop string for current browser
|
|
initForSprite(sprite)
|
|
|
setCanvasStyle(context, shape)
|
|
|
setDirection(x0, y0, x1, y1)
Set direction of the gradient by defining start and endpoint
locations as vectors from top-left corner to bottom-right.
|
|
|
setDOMStyle(domEl, shape)
|
Field Detail
id
Common name for Lineargradient objects
Method Detail
{lime.fill.LinearGradient}
addColorStop(offset, color)
Add color stop to the gradient. Accepts same format as node.setFill().
- Parameters:
- {number} offset
- Position of color [0-1].
- {*} color
- Color value.
- Returns:
- {lime.fill.LinearGradient} object itself.
<private>
{string}
formatColorStop_(clr)
Format color stop string for current browser
- Parameters:
-
{Array.
} clr - Color in format [offset,color].
- Returns:
- {string} Color stop CSS string.
initForSprite(sprite)
- Parameters:
- sprite
setCanvasStyle(context, shape)
- Parameters:
- context
- shape
{lime.fill.LinearGradient}
setDirection(x0, y0, x1, y1)
Set direction of the gradient by defining start and endpoint
locations as vectors from top-left corner to bottom-right.
- Parameters:
- {number} x0
- Start position x coordinate.
- {number} y0
- Start position y coordinate.
- {number} x1
- End position x coordinate.
- {number} y1
- End position y coordinate.
- Returns:
- {lime.fill.LinearGradient} object itself.
setDOMStyle(domEl, shape)
- Parameters:
- domEl
- shape