Table of Contents

Class LinearGradientBuilder

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

The linear gradient builder implementation with direct target gradient vector and shading transformation ( more info )

public class LinearGradientBuilder : AbstractLinearGradientBuilder
Inheritance
LinearGradientBuilder
Inherited Members

Constructors

LinearGradientBuilder()

Constructs the builder instance

public LinearGradientBuilder()

Methods

GetCurrentSpaceToGradientVectorSpaceTransformation(Rectangle, AffineTransform)

protected override AffineTransform GetCurrentSpaceToGradientVectorSpaceTransformation(Rectangle targetBoundingBox, AffineTransform contextTransform)

Parameters

targetBoundingBox Rectangle
contextTransform AffineTransform

Returns

AffineTransform

GetGradientVector(Rectangle, AffineTransform)

protected override Point[] GetGradientVector(Rectangle targetBoundingBox, AffineTransform contextTransform)

Parameters

targetBoundingBox Rectangle
contextTransform AffineTransform

Returns

Point[]

SetCurrentSpaceToGradientVectorSpaceTransformation(AffineTransform)

Set the linear gradient space transformation which specifies the transformation from the current coordinates space to gradient vector space

public virtual LinearGradientBuilder SetCurrentSpaceToGradientVectorSpaceTransformation(AffineTransform transformation)

Parameters

transformation AffineTransform

the AffineTransform representing the transformation to set

Returns

LinearGradientBuilder

the current builder instance

Remarks

Set the linear gradient space transformation which specifies the transformation from the current coordinates space to gradient vector space

The current space is the one on which linear gradient will be drawn (as a fill or stroke color for shapes on PDF canvas). This transformation mainly used for color lines skewing.

SetGradientVector(double, double, double, double)

Set coordinates for gradient vector ( more info )

public virtual LinearGradientBuilder SetGradientVector(double x0, double y0, double x1, double y1)

Parameters

x0 double

the x coordinate of the vector start

y0 double

the y coordinate of the vector start

x1 double

the x coordinate of the vector end

y1 double

the y coordinate of the vector end

Returns

LinearGradientBuilder

the current builder instance