Class Gradient

A Component that defines gradient data.

Used primarily in a Brush Component.

Methods

Gradient:Gradient (_mode, ...) Gradient constructor.

Properties

self.Mode.get () Returns the Gradient's GradientMode.
self.Data.get () Returns the data used to construct the Gradient.
self.Stylesheet.get () Updates and returns the Gradient's stylesheet.


Methods

Gradient:Gradient (_mode, ...)
Gradient constructor. 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.

Parameters:

  • _mode GradientMode Determines Gradient data handling.
  • ... Gradient data. See description.

Returns:

    Gradient

Properties

self.Mode.get ()
Returns the Gradient's GradientMode.

Returns:

    GradientMode
self.Data.get ()
Returns the data used to construct the Gradient.

Returns:

    table
self.Stylesheet.get ()
Updates and returns the Gradient's stylesheet.

Returns:

    string
generated by LDoc 1.4.6 Last updated 2017-11-15 22:27:55