Overview
The RadialGradient
class provides a way to fill a shape
with a circular radial color gradient pattern.
The user may specify 2 or more gradient colors,
and this paint will provide an interpolation between each color.
proportional
variable is false. By default proportional is true, and the
gradient will be scaled to fill whatever shape it is applied to.
This paint will map the first color of the gradient to the focus point,
and the last color to the perimeter of the circle,
interpolating smoothly for any in-between colors specified by the user.
Any line drawn from the focus point to the circumference will
thus span all the gradient colors.
Specifying a focus point outside of the circle's radius will result
in the focus being set to the intersection point of the focus-center line
and the perimeter of the circle.
The application provides an array of Stop
s specifying how to distribute
the colors along the gradient. The Stop#offset
variable must be
the range 0.0 to 1.0 and act like keyframes along the gradient.
They mark where the gradient should be exactly a particular color.
Profile: common
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public-init | centerX | Number | 0.0 |
Defines the X coordinate of the center point of the circle defining the gradient. Defines the X coordinate of the center point of the circle defining the gradient. If proportional is true (the default), this value specifies a point on a unit square that will be scaled to match the size of the the shape that the gradient fills. The last color of the gradient is mapped to the perimeter of this circle. 0.0Profile: common |
|||
public-init | centerY | Number | 0.0 |
Defines the X coordinate of the center point of the circle defining the gradient. Defines the X coordinate of the center point of the circle defining the gradient. If proportional is true (the default), this value specifies a point on a unit square that will be scaled to match the size of the the shape that the gradient fills. The last color of the gradient is mapped to the perimeter of this circle. 0.0Profile: common |
|||
public-init | cycleMethod | CycleMethod | NO_CYCLE |
Defines which of the follwing cycle method is applied
to the |
|||
public-init | focusX | Number |
Defines the X coordinate of the point to which the first color is mapped. Defines the X coordinate of the point to which the first color is mapped. If proportional is true (the default), this value specifies a point on a unit square that will be scaled to match the size of the the shape that the gradient fills. Profile: common |
||||
public-init | focusY | Number |
Defines the Y coordinate of the point to which the first color is mapped. Defines the Y coordinate of the point to which the first color is mapped. If proportional is true (the default), this value specifies a point on a unit square that will be scaled to match the size of the the shape that the gradient fills. Profile: common |
||||
public-init | proportional | Boolean | true |
Indicates whether start and end values are proportional or absolute. Indicates whether start and end values are proportional or absolute. If this flag is true, start and end values are defined in a [0..1] space and will be scaled to match the size of the shape that the gradient fills. If this flag is false, then start and end values are absolute coordinates. trueProfile: common |
|||
public-init | radius | Number | 1.0 |
Specifies the radius of the circle defining the extents of the color gradient. Specifies the radius of the circle defining the extents of the color gradient. If proportional is true (the default), this value specifies a size relative to unit square that will be scaled to match the size of the the shape that the gradient fills. 1.0Profile: common |
|||
public-init | stops | Stop[] | empty |
A sequence of A sequence of Each stop in the sequence must have an offset that is greater than the previous stop in the sequence. emptyProfile: common |
Inherited Variables
Function Summary
- public getAWTPaint() : java.awt.Paint
Inherited Functions
javafx.scene.paint.Paint
- public abstract getAWTPaint() : java.awt.Paint