Defines a Gradient Component.
Gradient | Defines a Gradient Component. |
Functions | |
new | Expected arguments differ depending on mode. |
New Gradient | A Component that defines gradient data. |
Variables | |
gradient_data | Contains the Gradient’s data. |
stylesheet | The Gradient Component’s stylesheet. |
Functions | |
updateStylesheet | Updates the Gradient’s stylesheet. |
Properties | |
Gradient Properties |
local function new ( _, mode, ... )
Expected arguments differ depending on mode.
Linear mode expects a comma-separated list of numbers (x1, y1, x2, y2) followed by any number of stop, color (number, Color Component) pairs.
Radial mode expects a comma-separated list of numbers (cx, cy, radius, fx, fy) following by any number of stop, color (number, Color Component) pairs.
Conical mode expects a comma-separated list of numbers (cx, cy, radius, angle) following by any number of stop, color (number, Color Component) pairs.
All numeric values are expected to between 0.0 and 1.0, to be understood as percentage of Frame size.
I wish Gradients were easier, but there it is. =p
mode | The Gradient’s mode. Must be a valid GradientMode Enum. |
... | Gradient data. See description. |
A new Gradient Component.
A Component that defines gradient data. Used primarily in a Brush Component.
Variables | |
gradient_data | Contains the Gradient’s data. |
stylesheet | The Gradient Component’s stylesheet. |
Functions | |
updateStylesheet | Updates the Gradient’s stylesheet. |
Properties | |
Gradient Properties |
local stylesheet
The Gradient Component’s stylesheet. Generated via updateStylesheet.
local function updateStylesheet ()
Updates the Gradient’s stylesheet. Output is based on GradientMode.
Mode | Returns the Gradient’s GradientMode Enum. |
Data | Returns a copy of the Gradient’s gradient_data. |
Stylesheet | Updates and returns the Gradient Component’s stylesheet. |
Expected arguments differ depending on mode.
local function new ( _, mode, ... )
Contains the Gradient’s data.
local gradient_data
The Gradient Component’s stylesheet.
local stylesheet
Updates the Gradient’s stylesheet.
local function updateStylesheet ()