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
) offset
rgb
- the color value
public GradientColorStop(float[] rgb, double offset, GradientColorStop.OffsetType offsetType)
rgb
- the color value
offset
- the offset value. Makes sense only if the offsetType
is not GradientColorStop.OffsetType.AUTO
offsetType
- the offset's type
public GradientColorStop(GradientColorStop gradientColorStop, double offset, GradientColorStop.OffsetType offsetType)
gradientColorStop
- the gradient stop color from which the color value would be copied
offset
- the new offset. Makes sense only if the offsetType
is not GradientColorStop.OffsetType.AUTO
offsetType
- the new offset's type
public 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.AUTO
offsetType
- the offset's type to be set
GradientColorStop
instance
public 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.NONE
hintOffsetType
- the hint offset's type to be set
GradientColorStop
instance
Copyright © 1998–2021 iText Group NV. All rights reserved.