Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: RadialGradient

[15:7] extends: FxObj

Wraps JavaFX RadialGradient, a paint that radiates colors outward from a center focal point through a series of color stops. The focal point can be offset from the center using a focus angle and distance, and coordinates may be proportional or absolute. A cycle method controls how the gradient repeats beyond the defined radius. It can be used with GraphicsContext setFill() and setStroke() in place of a solid Color.

Methods

  • RadialGradient (double FocusAngle, double FocusDistance, double CenterX, double CenterY, double Radius, bool Proportional, string CycleMethod, list Stops)

    Creates a new radial gradient.

    • @p FocusAngle is a double with the angle of the focus point in degrees.
    • @p FocusDistance is a double with the distance of the focus point from the center (0.0 to 1.0).
    • @p CenterX is a double with the center X coordinate.
    • @p CenterY is a double with the center Y coordinate.
    • @p Radius is a double with the radius of the gradient.
    • @p Proportional is a bool. When true, coordinates are proportional (0.0 to 1.0). When false, they are absolute.
    • @p CycleMethod is a string with the cycle method: NO_CYCLE, REFLECT, or REPEAT.
    • @p Stops is a list of Stop objects defining the gradient colors.