java.lang.Object
omix.lang.Gradient
omix.lang.RadialGradient
- All Implemented Interfaces:
Serializable
,Brush
,Paint
public final class RadialGradient extends Gradient
This class represents radial gradients. Radial gradients interpolate colors
between a focal point and end points on a circle surrounding it.
Outside the end points the gradient is either padded,
reflected or repeated depending on the currently set spread method.
- Author:
- Dr. Peter Droste, Omix Visualization
- See Also:
- Serialized Form
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description RadialGradient(Map<Double,Color> stops, Gradient.Spread spread)
Creates a gradient according to the submitted set of colors.RadialGradient(Color color)
The same as RadialGradient(color, color, Spread.PadSpread)RadialGradient(Color color0, Color color1)
The same as RadialGradient(color0, color1, Spread.PadSpread)RadialGradient(Color color0, Color color1, Gradient.Spread spread)
Creates a gradient between the two submitted colors.RadialGradient(Color color, Gradient.Spread spread)
The same as RadialGradient(color, color, spread) -
Method Summary
Modifier and Type Method Description RadialGradient
clone()
boolean
equals(Object obj)
double
getCenterX()
double
getCenterY()
double
getFocalPointX()
double
getFocalPointY()
double
getRadius()
int
hashCode()
void
setCenter(double centerX, double centerY)
changes the coordinates of the center pointvoid
setCenterX(double centerX)
changes the x coordinate of the center pointvoid
setCenterY(double centerY)
changes the y coordinate of the center pointvoid
setFocalPoint(double focalPointX, double focalPointY)
changes the coordinates of the focal pointvoid
setFocalPointX(double focalPointX)
changes the x coordinate of the focal pointvoid
setFocalPointY(double focalPointY)
changes the y coordinate of the focal pointvoid
setRadius(double radius)
changes the radius of this radial gradient
-
Constructor Details
-
RadialGradient
The same as RadialGradient(color0, color1, Spread.PadSpread)- Parameters:
color0
- Color at value 0.0color1
- Color at value 1.0
-
RadialGradient
The same as RadialGradient(color, color, Spread.PadSpread)- Parameters:
color
- Color at value 0.0 and 1.0
-
RadialGradient
@ConstructorProperties({"color0","color1","spread"}) public RadialGradient(Color color0, Color color1, Gradient.Spread spread)Creates a gradient between the two submitted colors.- Parameters:
color0
- Color at value 0.0color1
- Color at value 1.0spread
- Spread of the gradient
-
RadialGradient
@ConstructorProperties({"color","spread"}) public RadialGradient(Color color, Gradient.Spread spread)The same as RadialGradient(color, color, spread)- Parameters:
color
- Color at value 0.0 and 1.0spread
- Spread of the gradient
-
RadialGradient
@ConstructorProperties({"stops","spread"}) public RadialGradient(Map<Double,Color> stops, Gradient.Spread spread)Creates a gradient according to the submitted set of colors.- Parameters:
stops
- color stopsspread
- Spread of the gradient
-
-
Method Details
-
getCenterX
public double getCenterX()- Returns:
- the x coordinate of the center point
-
setCenterX
public void setCenterX(double centerX)changes the x coordinate of the center point- Parameters:
centerX
- x coordinate of the gradient center
-
setCenter
public void setCenter(double centerX, double centerY)changes the coordinates of the center point- Parameters:
centerX
- x coordinate of the gradient centercenterY
- y coordinate of the gradient center
-
getCenterY
public double getCenterY()- Returns:
- the y coordinate of the center point
-
setCenterY
public void setCenterY(double centerY)changes the y coordinate of the center point- Parameters:
centerY
- y coordinate of the gradient center
-
getFocalPointX
public double getFocalPointX()- Returns:
- the x coordinate of the focal point
-
setFocalPointX
public void setFocalPointX(double focalPointX)changes the x coordinate of the focal point- Parameters:
focalPointX
- x coordinate of the focal point
-
getFocalPointY
public double getFocalPointY()- Returns:
- the y coordinate of the focal point
-
setFocalPointY
public void setFocalPointY(double focalPointY)changes the y coordinate of the focal point- Parameters:
focalPointY
- y coordinate of the focal point
-
setFocalPoint
public void setFocalPoint(double focalPointX, double focalPointY)changes the coordinates of the focal point- Parameters:
focalPointX
- x coordinate of the focal pointfocalPointY
- y coordinate of the focal point
-
getRadius
public double getRadius()- Returns:
- the radius of this radial gradient.
-
setRadius
public void setRadius(double radius)changes the radius of this radial gradient- Parameters:
radius
- radius of this radial gradient
-
clone
-
hashCode
public int hashCode() -
equals
-