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:
Properties
- self.Mode.get ()
-
Returns the Gradient's GradientMode.
Returns:
- self.Data.get ()
-
Returns the data used to construct the Gradient.
Returns:
- self.Stylesheet.get ()
-
Updates and returns the Gradient's stylesheet.
Returns: