Class GradientColorStop
The gradient stop color structure representing the stop color configuration.
public class GradientColorStop
- Inheritance
-
GradientColorStop
- Inherited Members
Remarks
The gradient stop color structure representing the stop color configuration. The stop color consists of:
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
Constructors
GradientColorStop(float[])
Constructor of stop color with with specified rgb color and default ( AUTO ) offset
public GradientColorStop(float[] rgb)
Parameters
rgb
float[]the color value
GradientColorStop(float[], double, OffsetType)
Constructor of stop color with with specified rgb color and offset
public GradientColorStop(float[] rgb, double offset, GradientColorStop.OffsetType offsetType)
Parameters
rgb
float[]the color value
offset
doublethe offset value. Makes sense only if the
offsetType
is not AUTOoffsetType
GradientColorStop.OffsetTypethe offset's type
GradientColorStop(GradientColorStop, double, OffsetType)
Constructor that creates the stop with the same color as the another stop and new offset
public GradientColorStop(GradientColorStop gradientColorStop, double offset, GradientColorStop.OffsetType offsetType)
Parameters
gradientColorStop
GradientColorStopthe gradient stop color from which the color value would be copied
offset
doublethe new offset. Makes sense only if the
offsetType
is not AUTOoffsetType
GradientColorStop.OffsetTypethe new offset's type
Methods
Equals(object)
public override bool Equals(object o)
Parameters
o
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetHintOffset()
Get the hint offset value
public virtual double GetHintOffset()
Returns
- double
the hint offset value
GetHintOffsetType()
Get the hint offset type
public virtual GradientColorStop.HintOffsetType GetHintOffsetType()
Returns
- GradientColorStop.HintOffsetType
the hint offset type
GetOffset()
Get the offset value
public virtual double GetOffset()
Returns
- double
the offset value
GetOffsetType()
Get the offset type
public virtual GradientColorStop.OffsetType GetOffsetType()
Returns
- GradientColorStop.OffsetType
the offset type
GetRgbArray()
Get the stop color rgb value
public virtual float[] GetRgbArray()
Returns
- float[]
the copy of stop's rgb value
SetHint(double, HintOffsetType)
Set the color hint specified by its value and type ( more details ).
public virtual GradientColorStop SetHint(double hintOffset, GradientColorStop.HintOffsetType hintOffsetType)
Parameters
hintOffset
doublethe hint offset's value to be set. Makes sense only if the
hintOffsetType
is not NONEhintOffsetType
GradientColorStop.HintOffsetTypethe hint offset's type to be set
Returns
- GradientColorStop
the current GradientColorStop instance
SetOffset(double, OffsetType)
Set the offset specified by its value and type
public virtual GradientColorStop SetOffset(double offset, GradientColorStop.OffsetType offsetType)
Parameters
offset
doublethe offset's value to be set. Makes sense only if the
offsetType
is not AUTOoffsetType
GradientColorStop.OffsetTypethe offset's type to be set
Returns
- GradientColorStop
the current GradientColorStop instance