Gradient

Defines a Gradient Component.

Summary
GradientDefines a Gradient Component.
Functions
newExpected arguments differ depending on mode.
New GradientA Component that defines gradient data.
Variables
gradient_dataContains the Gradient’s data.
stylesheetThe Gradient Component’s stylesheet.
Functions
updateStylesheetUpdates the Gradient’s stylesheet.
Properties
Gradient Properties

Functions

new

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

Parameters

modeThe Gradient’s mode.  Must be a valid GradientMode Enum.
...Gradient data.  See description.

Returns

A new Gradient Component.

New Gradient

A Component that defines gradient data.  Used primarily in a Brush Component.

Summary
Variables
gradient_dataContains the Gradient’s data.
stylesheetThe Gradient Component’s stylesheet.
Functions
updateStylesheetUpdates the Gradient’s stylesheet.
Properties
Gradient Properties

Variables

gradient_data

local gradient_data

Contains the Gradient’s data.

stylesheet

local stylesheet

The Gradient Component’s stylesheet.  Generated via updateStylesheet.

Functions

updateStylesheet

local function updateStylesheet ()

Updates the Gradient’s stylesheet.  Output is based on GradientMode.

Properties

Gradient Properties

ModeReturns the Gradient’s GradientMode Enum.
DataReturns a copy of the Gradient’s gradient_data.
StylesheetUpdates and returns the Gradient Component’s stylesheet.
local function new (_,
mode,
...)
Expected arguments differ depending on mode.
local gradient_data
Contains the Gradient’s data.
local stylesheet
The Gradient Component’s stylesheet.
local function updateStylesheet ()
Updates the Gradient’s stylesheet.
Defines a Brush Component.
Close