Basics
Guides
API Reference
Basics
Guides
API Reference
[15:7] extends: FxObj
Wraps JavaFX LinearGradient, a paint that transitions colors along a straight line defined by two points and a series of color stops. The gradient can use proportional (0.0 to 1.0) or absolute pixel coordinates, and a cycle method controls what happens beyond the defined endpoints. It can be used with GraphicsContext setFill() and setStroke() in place of a solid Color.
LinearGradient (double StartX, double StartY, double EndX, double EndY, bool Proportional, string CycleMethod, list Stops)
Creates a new linear gradient.
StartX is a double with the start X coordinate.StartY is a double with the start Y coordinate.EndX is a double with the end X coordinate.EndY is a double with the end Y coordinate.Proportional is a bool. When true, coordinates are proportional (0.0 to 1.0). When false, they are absolute.CycleMethod is a string with the cycle method: NO_CYCLE, REFLECT, or REPEAT.Stops is a list of Stop objects defining the gradient colors.getStartX ()
Returns the X coordinate of the gradient start point.
A double with the start X.getStartY ()
Returns the Y coordinate of the gradient start point.
A double with the start Y.getEndX ()
Returns the X coordinate of the gradient end point.
A double with the end X.getEndY ()
Returns the Y coordinate of the gradient end point.
A double with the end Y.isProportional ()
Returns whether the gradient coordinates are proportional (0.0 to 1.0) rather than absolute pixel values.
A bool with true when proportional.getCycleMethod ()
Returns the cycle method enum value used when the gradient is sampled outside the defined start/end points.
An AJO holding the javafx.scene.paint.CycleMethod enum value.getStops ()
Returns the list of color Stop entries that define the gradient.
A List AJO of Stop elements.isOpaque ()
Returns whether the gradient is fully opaque (every stop color has an alpha of 1.0).
A bool with true when the gradient is opaque.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.