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
attribute 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 user must provide an array of floats specifying how to distribute
the colors along the gradient. These values should range from 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
Attribute Summary
name | type | description |
---|---|---|
Public | ||
centerX | Number |
Defines the X coordinate of the center point of the circle defining the gradient. More: [+]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. Profile: common |
centerY | Number |
Defines the X coordinate of the center point of the circle defining the gradient. More: [+]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. Profile: common |
cycleMethod | CycleMethod |
Defines which of the follwing cycle method is applied
to the Defines which of the follwing cycle method is applied
to the Profile: common conditional multigradient |
focusX | Number |
Defines the X coordinate of the point to which the first color is mapped. More: [+]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 |
focusY | Number |
Defines the Y coordinate of the point to which the first color is mapped. More: [+]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 |
proportional | Boolean |
More: [+]
Profile: common |
radius | Number |
Specifies the radius of the circle defining the extents of the color gradient. More: [+]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. Profile: common |
stops | Stop[] |
More: [+]
Profile: common |
Protected |
Inherited Attributes
Function Summary
- public getAWTPaint() : java.awt.Paint
-
Returns the {java.awt.Paint} delegate for this
More: [+]RadialGradient
.Returns the {java.awt.Paint} delegate for this
RadialGradient
.-
Returns
- Paint
Inherited Functions
javafx.scene.paint.Paint
- public abstract getAWTPaint() : java.awt.Paint
-
Creates and returns a paint context used to generate the color pattern.
More: [+]Creates and returns a paint context used to generate the color pattern.
-
Returns
- Paint
- the paint context for generating color patterns