Class RadialGradient
java.lang.Object
com.github.tadukoo.view.paint.gradient.RadialGradient
- All Implemented Interfaces:
Gradient,SizablePaint
Linear Gradient is used to build a
Gradient object to use for RadialGradientPaint.- Since:
- Alpha v.0.2
- Version:
- Alpha v.0.2.1
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRadial Gradient Builder is a builder forRadialGradient. -
Field Summary
FieldsModifier and TypeFieldDescriptionA function taking in the dimension of the space to determine the center, radius, and focus of the circleprotected final Color[]TheColors involved in this LinearGradientprotected final MultipleGradientPaint.ColorSpaceTypeThecolor spaceinvolved in this LinearGradientprotected final MultipleGradientPaint.CycleMethodThecycle methodinvolved in this LinearGradientprotected final float[]The fractions involved in this LinearGradientprotected final AffineTransformTheAffineTransforminvolved in this LinearGradient -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRadialGradient(Function<Dimension, com.github.tadukoo.util.tuple.Triple<Point2D, Float, Point2D>> circleFunc, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform) Constructs a new Radial Gradient using the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Color[]float[]Creates aRadialGradientPaintusing thecircleFuncto determine the center, radius, and focus of the circle, and sending the other parameters as specified.
-
Field Details
-
circleFunc
protected final Function<Dimension,com.github.tadukoo.util.tuple.Triple<Point2D, circleFuncFloat, Point2D>> A function taking in the dimension of the space to determine the center, radius, and focus of the circle -
fractions
protected final float[] fractionsThe fractions involved in this LinearGradient -
colors
TheColors involved in this LinearGradient -
cycleMethod
Thecycle methodinvolved in this LinearGradient -
colorSpace
Thecolor spaceinvolved in this LinearGradient -
gradientTransform
TheAffineTransforminvolved in this LinearGradient
-
-
Constructor Details
-
RadialGradient
private RadialGradient(Function<Dimension, com.github.tadukoo.util.tuple.Triple<Point2D, Float, Point2D>> circleFunc, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform) Constructs a new Radial Gradient using the given parameters.- Parameters:
circleFunc- A function taking in the dimension of the space to determine the center, radius, and focus of the circlefractions- The fractions involved in this LinearGradientcolors- TheColors involved in this LinearGradientcycleMethod- Thecycle methodinvolved in this LinearGradientcolorSpace- Thecolor spaceinvolved in this LinearGradientgradientTransform- TheAffineTransforminvolved in this LinearGradient
-
-
Method Details
-
builder
- Returns:
- A
RadialGradient.RadialGradientBuilderto use in building a RadialGradient
-
getFractions
public float[] getFractions()- Specified by:
getFractionsin interfaceGradient- Returns:
- The fractions involved in this Gradient
-
getColors
-
getCycleMethod
- Specified by:
getCycleMethodin interfaceGradient- Returns:
- The
cycle methodinvolved in the Gradient
-
getColorSpace
- Specified by:
getColorSpacein interfaceGradient- Returns:
- The
color spaceinvolved in the Gradient
-
getGradientTransform
- Specified by:
getGradientTransformin interfaceGradient- Returns:
- The
AffineTransforminvolved in the Gradient
-
getCircleFunc
public Function<Dimension,com.github.tadukoo.util.tuple.Triple<Point2D, getCircleFunc()Float, Point2D>> - Returns:
- A function taking in the dimension of the space to determine the center, radius, and focus of the circle
-
getPaint
Creates aRadialGradientPaintusing thecircleFuncto determine the center, radius, and focus of the circle, and sending the other parameters as specified.- Specified by:
getPaintin interfaceSizablePaint- Parameters:
size- The dimensions of the object the Gradient will go on- Returns:
- A new
RadialGradientPaintusing the parameters of this RadialGradient
-