Class SVGMultipleGradientPaint
java.lang.Object
com.github.weisj.jsvg.paint.impl.jdk.SVGMultipleGradientPaint
- All Implemented Interfaces:
Paint, Transparency
- Direct Known Subclasses:
SVGRadialGradientPaint
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final @NotNull Color @NotNull []Gradient colors.(package private) final MultipleGradientPaint.ColorSpaceTypeThe color space in which to perform the gradient interpolation.(package private) final MultipleGradientPaint.CycleMethodThe method to use when painting outside the gradient bounds.(package private) int(package private) final float @NotNull []Gradient keyframe values in the range 0 to 1.(package private) SoftReference<int[]> (package private) SoftReference<int[][]> (package private) final @NotNull AffineTransformTransform to apply to gradient.(package private) boolean(package private) ColorModelThe following fields are used only by MultipleGradientPaintContext to cache certain values that remain constant and do not need to be recalculated for each context created from this paint instance.(package private) float[](package private) final intThe transparency of this paint object.Fields inherited from interface Transparency
BITMASK, OPAQUE, TRANSLUCENT -
Constructor Summary
ConstructorsConstructorDescriptionSVGMultipleGradientPaint(float @NotNull [] fractions, @NotNull Color @NotNull [] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, @NotNull AffineTransform gradientTransform) Package-private constructor. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Paint
createContext
-
Field Details
-
transparency
final int transparencyThe transparency of this paint object. -
fractions
final float @NotNull [] fractionsGradient keyframe values in the range 0 to 1. -
colors
Gradient colors. -
gradientTransform
Transform to apply to gradient. -
cycleMethod
The method to use when painting outside the gradient bounds. -
colorSpace
The color space in which to perform the gradient interpolation. -
model
ColorModel modelThe following fields are used only by MultipleGradientPaintContext to cache certain values that remain constant and do not need to be recalculated for each context created from this paint instance. -
normalizedIntervals
float[] normalizedIntervals -
isSimpleLookup
boolean isSimpleLookup -
gradients
SoftReference<int[][]> gradients -
gradient
SoftReference<int[]> gradient -
fastGradientArraySize
int fastGradientArraySize
-
-
Constructor Details
-
SVGMultipleGradientPaint
SVGMultipleGradientPaint(float @NotNull [] fractions, @NotNull @NotNull Color @NotNull [] colors, @NotNull MultipleGradientPaint.CycleMethod cycleMethod, @NotNull MultipleGradientPaint.ColorSpaceType colorSpace, @NotNull @NotNull AffineTransform gradientTransform) Package-private constructor.- Parameters:
fractions- numbers ranging from 0.0 to 1.0 specifying the distribution of colors along the gradientcolors- array of colors corresponding to each fractional valuecycleMethod- eitherNO_CYCLE,REFLECT, orREPEATcolorSpace- which color space to use for interpolation, eitherSRGBorLINEAR_RGBgradientTransform- transform to apply to the gradient- Throws:
NullPointerException- iffractionsarray is null, orcolorsarray is null, orgradientTransformis null, orcycleMethodis null, orcolorSpaceis nullIllegalArgumentException- iffractions.length != colors.length, orcolorsis less than 2 in size, or afractionsvalue is less than 0.0 or greater than 1.0, or thefractionsare not provided in strictly increasing order
-
-
Method Details
-
getTransparency
public int getTransparency()- Specified by:
getTransparencyin interfaceTransparency
-