Table of Contents

Class GradientColorStop

Namespace
iText.Kernel.Colors.Gradients
Assembly
itext.kernel.dll

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 double

the offset value. Makes sense only if the offsetType is not AUTO

offsetType GradientColorStop.OffsetType

the 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 GradientColorStop

the gradient stop color from which the color value would be copied

offset double

the new offset. Makes sense only if the offsetType is not AUTO

offsetType GradientColorStop.OffsetType

the new offset's type

Methods

Equals(object)

public override bool Equals(object o)

Parameters

o object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

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 double

the hint offset's value to be set. Makes sense only if the hintOffsetType is not NONE

hintOffsetType GradientColorStop.HintOffsetType

the 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 double

the offset's value to be set. Makes sense only if the offsetType is not AUTO

offsetType GradientColorStop.OffsetType

the offset's type to be set

Returns

GradientColorStop

the current GradientColorStop instance