Table of Contents

Class PathRenderInfo

Namespace
iText.Kernel.Pdf.Canvas.Parser.Data
Assembly
itext.kernel.dll

Contains information relating to painting current path.

public class PathRenderInfo : AbstractRenderInfo, IEventData
Inheritance
PathRenderInfo
Implements
Inherited Members

Constructors

PathRenderInfo(Stack<CanvasTag>, CanvasGraphicsState, Path, int)

If the operation is NO_OP then the rule is ignored, otherwise NONZERO_WINDING is used by default.

public PathRenderInfo(Stack<CanvasTag> canvasTagHierarchy, CanvasGraphicsState gs, Path path, int operation)

Parameters

canvasTagHierarchy Stack<CanvasTag>

the canvas tag hierarchy

gs CanvasGraphicsState

the graphics state

path Path

the path to be rendered

operation int

one of the possible combinations of STROKE and FILL values or NO_OP

Remarks

If the operation is NO_OP then the rule is ignored, otherwise NONZERO_WINDING is used by default. With this constructor path is considered as not modifying clipping path.

See

PathRenderInfo(Stack<CanvasTag>, CanvasGraphicsState, Path, int, int, bool, int)

Creates the new PathRenderInfo instance.

public PathRenderInfo(Stack<CanvasTag> canvasTagHierarchy, CanvasGraphicsState gs, Path path, int operation, int rule, bool isClip, int clipRule)

Parameters

canvasTagHierarchy Stack<CanvasTag>

the canvas tag hierarchy

gs CanvasGraphicsState

the graphics state

path Path

the path to be rendered

operation int

one of the possible combinations of STROKE and FILL values or NO_OP

rule int

either NONZERO_WINDING or EVEN_ODD

isClip bool

true indicates that current path modifies the clipping path

clipRule int

either NONZERO_WINDING or EVEN_ODD

Fields

FILL

Value specifying fill operation to perform on the current path.

public const int FILL = 2

Field Value

int

Remarks

Value specifying fill operation to perform on the current path. When the fill operation is performed it should use either nonzero winding or even-odd rule.

NO_OP

End the path object without filling or stroking it.

public const int NO_OP = 0

Field Value

int

Remarks

End the path object without filling or stroking it. This operator shall be a path-painting no-op, used primarily for the side effect of changing the current clipping path

STROKE

Value specifying stroke operation to perform on the current path.

public const int STROKE = 1

Field Value

int

Methods

GetCanvasTagHierarchy()

Gets hierarchy of the canvas tags that wraps given text.

public virtual IList<CanvasTag> GetCanvasTagHierarchy()

Returns

IList<CanvasTag>

list of the wrapping canvas tags. The first tag is the innermost (nearest to the text)

GetClippingRule()

Gets either NONZERO_WINDING or EVEN_ODD.

public virtual int GetClippingRule()

Returns

int

the clipping rule value

GetCtm()

Gets the current transformation matrix.

public virtual Matrix GetCtm()

Returns

Matrix

the current transformation matrix

GetFillColor()

Gets the path's fill color.

public virtual Color GetFillColor()

Returns

Color

the path's fill color

GetLineCapStyle()

Gets the line cap style.

public virtual int GetLineCapStyle()

Returns

int

the line cap style value

Remarks

Gets the line cap style. See PdfCanvasConstants.LineCapStyle.

GetLineDashPattern()

Gets the path's dash pattern.

public virtual PdfArray GetLineDashPattern()

Returns

PdfArray

the path's dash pattern as a PdfArray

GetLineJoinStyle()

Gets the line join style.

public virtual int GetLineJoinStyle()

Returns

int

the line join style value

Remarks

Gets the line join style. See PdfCanvasConstants.LineJoinStyle.

GetLineWidth()

Gets the path's line width.

public virtual float GetLineWidth()

Returns

float

the path's line width

GetMcid()

Gets the marked-content identifier associated with this PathRenderInfo instance

public virtual int GetMcid()

Returns

int

associated marked-content identifier or -1 in case content is unmarked

GetMiterLimit()

Gets the miter limit.

public virtual float GetMiterLimit()

Returns

float

the miter limit

GetOperation()

Gets the int value which is either NO_OP or one of possible combinations of STROKE and FILL.

public virtual int GetOperation()

Returns

int

the operation value

GetPath()

Gets the Path to be rendered

public virtual Path GetPath()

Returns

Path

the Path to be rendered

GetRule()

Gets either NONZERO_WINDING or EVEN_ODD.

public virtual int GetRule()

Returns

int

the rule value

GetStrokeColor()

Gets the path's stroke color.

public virtual Color GetStrokeColor()

Returns

Color

the path's stroke color

HasMcid(int)

Checks if this PathRenderInfo instance belongs to a marked content sequence with a given mcid.

public virtual bool HasMcid(int mcid)

Parameters

mcid int

a marked content id

Returns

bool

true if this PathRenderInfo instance is marked with this id, false otherwise

HasMcid(int, bool)

Checks if this PathRenderInfo instance belongs to a marked content sequence with a given mcid.

public virtual bool HasMcid(int mcid, bool checkTheTopmostLevelOnly)

Parameters

mcid int

a marked content id

checkTheTopmostLevelOnly bool

indicates whether to check the topmost level of marked content stack only

Returns

bool

true if this PathRenderInfo instance is marked with this id, false otherwise

IsPathModifiesClippingPath()

Gets the clipping path flag.

public virtual bool IsPathModifiesClippingPath()

Returns

bool

true indicates that current path modifies the clipping path