public class GradientColorStop extends Object
float[] rgb color array. Values should be in [0, 1] range. All values outside of
this range would be adjusted to the nearest corner of the range.
- double offset and GradientColorStop.OffsetType offset type specifies the coordinate of
the stop color on the targeting gradient coordinates vector
- double hint offset and GradientColorStop.HintOffsetType hint offset type specifies the color
transition mid point offset between the current color and the next color| Modifier and Type | Class and Description |
|---|---|
static class |
GradientColorStop.HintOffsetType
Represents the possible hint offset type
|
static class |
GradientColorStop.OffsetType
Represents the possible offset type
|
| Constructor and Description |
|---|
GradientColorStop(float[] rgb)
Constructor of stop color with with specified rgb color and default (
GradientColorStop.OffsetType.AUTO)
offset |
GradientColorStop(float[] rgb,
double offset,
GradientColorStop.OffsetType offsetType)
Constructor of stop color with with specified rgb color and offset
|
GradientColorStop(GradientColorStop gradientColorStop,
double offset,
GradientColorStop.OffsetType offsetType)
Constructor that creates the stop with the same color as the another stop and new offset
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
double |
getHintOffset()
Get the hint offset value
|
GradientColorStop.HintOffsetType |
getHintOffsetType()
Get the hint offset type
|
double |
getOffset()
Get the offset value
|
GradientColorStop.OffsetType |
getOffsetType()
Get the offset type
|
float[] |
getRgbArray()
Get the stop color rgb value
|
int |
hashCode() |
GradientColorStop |
setHint(double hintOffset,
GradientColorStop.HintOffsetType hintOffsetType)
Set the color hint specified by its value and type (
more details). |
GradientColorStop |
setOffset(double offset,
GradientColorStop.OffsetType offsetType)
Set the offset specified by its value and type
|
public GradientColorStop(float[] rgb)
GradientColorStop.OffsetType.AUTO)
offsetrgb - the color valuepublic GradientColorStop(float[] rgb,
double offset,
GradientColorStop.OffsetType offsetType)
rgb - the color valueoffset - the offset value. Makes sense only if the offsetType is not GradientColorStop.OffsetType.AUTOoffsetType - the offset's typepublic GradientColorStop(GradientColorStop gradientColorStop, double offset, GradientColorStop.OffsetType offsetType)
gradientColorStop - the gradient stop color from which the color value would be copiedoffset - the new offset. Makes sense only if the offsetType is not GradientColorStop.OffsetType.AUTOoffsetType - the new offset's typepublic float[] getRgbArray()
public GradientColorStop.OffsetType getOffsetType()
public double getOffset()
public double getHintOffset()
public GradientColorStop.HintOffsetType getHintOffsetType()
public GradientColorStop setOffset(double offset, GradientColorStop.OffsetType offsetType)
offset - the offset's value to be set. Makes sense only if the offsetType
is not GradientColorStop.OffsetType.AUTOoffsetType - the offset's type to be setGradientColorStop instancepublic GradientColorStop setHint(double hintOffset, GradientColorStop.HintOffsetType hintOffsetType)
more details).hintOffset - the hint offset's value to be set. Makes sense only
if the hintOffsetType is not GradientColorStop.HintOffsetType.NONEhintOffsetType - the hint offset's type to be setGradientColorStop instanceCopyright © 1998–2025 Apryse Group NV. All rights reserved.