Class PathRenderInfo
java.lang.Object
com.itextpdf.kernel.pdf.canvas.parser.data.AbstractRenderInfo
com.itextpdf.kernel.pdf.canvas.parser.data.PathRenderInfo
- All Implemented Interfaces:
-
IEventData
Contains information relating to painting current path.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Value specifying fill operation to perform on the current path.static final int
End the path object without filling or stroking it.static final int
Value specifying stroke operation to perform on the current path.Fields inherited from class com.itextpdf.kernel.pdf.canvas.parser.data.AbstractRenderInfo
gs
-
Constructor Summary
ConstructorDescriptionPathRenderInfo
(Stack<CanvasTag> canvasTagHierarchy, CanvasGraphicsState gs, Path path, int operation) If the operation isNO_OP
then the rule is ignored, otherwisePdfCanvasConstants.FillingRule.NONZERO_WINDING
is used by default.PathRenderInfo
(Stack<CanvasTag> canvasTagHierarchy, CanvasGraphicsState gs, Path path, int operation, int rule, boolean isClip, int clipRule) Creates the newPathRenderInfo
instance. -
Method Summary
Modifier and TypeMethodDescriptionGets hierarchy of the canvas tags that wraps given text.int
getCtm()
Gets the current transformation matrix.Gets the path's fill color.int
Gets the line cap style.Gets the path's dash pattern.int
Gets the line join style.float
Gets the path's line width.int
getMcid()
Gets the marked-content identifier associated with thisPathRenderInfo
instancefloat
Gets the miter limit.int
getPath()
Gets thePath
to be renderedint
getRule()
Gets the path's stroke color.boolean
hasMcid
(int mcid) Checks if the text belongs to a marked content sequence with a given mcid.boolean
hasMcid
(int mcid, boolean checkTheTopmostLevelOnly) Checks if the text belongs to a marked content sequence with a given mcid.boolean
Gets the clipping path flag.Methods inherited from class com.itextpdf.kernel.pdf.canvas.parser.data.AbstractRenderInfo
checkGraphicsState, getGraphicsState, isGraphicsStatePreserved, preserveGraphicsState, releaseGraphicsState
-
Field Details
-
NO_OP
public static final int NO_OPEnd 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- See Also:
-
STROKE
public static final int STROKEValue specifying stroke operation to perform on the current path.- See Also:
-
FILL
public static final int FILLValue 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.- See Also:
-
-
Constructor Details
-
PathRenderInfo
public PathRenderInfo(Stack<CanvasTag> canvasTagHierarchy, CanvasGraphicsState gs, Path path, int operation, int rule, boolean isClip, int clipRule) Creates the newPathRenderInfo
instance.- Parameters:
-
canvasTagHierarchy
- the canvas tag hierarchy -
gs
- the graphics state -
path
- the path to be rendered -
operation
- one of the possible combinations ofSTROKE
andFILL
values orNO_OP
-
rule
- eitherPdfCanvasConstants.FillingRule.NONZERO_WINDING
orPdfCanvasConstants.FillingRule.EVEN_ODD
-
isClip
-true
indicates that current path modifies the clipping path -
clipRule
- eitherPdfCanvasConstants.FillingRule.NONZERO_WINDING
orPdfCanvasConstants.FillingRule.EVEN_ODD
-
PathRenderInfo
public PathRenderInfo(Stack<CanvasTag> canvasTagHierarchy, CanvasGraphicsState gs, Path path, int operation) If the operation isNO_OP
then the rule is ignored, otherwisePdfCanvasConstants.FillingRule.NONZERO_WINDING
is used by default. With this constructor path is considered as not modifying clipping path.See
PathRenderInfo(Stack, CanvasGraphicsState, Path, int, int, boolean, int)
-
-
Method Details
-
getPath
Gets thePath
to be rendered- Returns:
-
the
Path
to be rendered
-
getOperation
public int getOperation()- Returns:
- the operation value
-
getRule
public int getRule()Gets eitherPdfCanvasConstants.FillingRule.NONZERO_WINDING
orPdfCanvasConstants.FillingRule.EVEN_ODD
.- Returns:
- the rule value
-
isPathModifiesClippingPath
public boolean isPathModifiesClippingPath()Gets the clipping path flag.- Returns:
-
true
indicates that current path modifies the clipping path
-
getClippingRule
public int getClippingRule()Gets eitherPdfCanvasConstants.FillingRule.NONZERO_WINDING
orPdfCanvasConstants.FillingRule.EVEN_ODD
.- Returns:
- the clipping rule value
-
getCtm
Gets the current transformation matrix.- Returns:
-
the current transformation
matrix
-
getLineWidth
public float getLineWidth()Gets the path's line width.- Returns:
- the path's line width
-
getLineCapStyle
public int getLineCapStyle()Gets the line cap style. SeePdfCanvasConstants.LineCapStyle
.- Returns:
- the line cap style value
-
getLineJoinStyle
public int getLineJoinStyle()Gets the line join style. SeePdfCanvasConstants.LineJoinStyle
.- Returns:
- the line join style value
-
getMiterLimit
public float getMiterLimit()Gets the miter limit.- Returns:
- the miter limit
-
getLineDashPattern
Gets the path's dash pattern.- Returns:
-
the path's dash pattern as a
PdfArray
-
getStrokeColor
Gets the path's stroke color.- Returns:
-
the path's stroke
color
-
getFillColor
Gets the path's fill color.- Returns:
-
the path's fill
color
-
getCanvasTagHierarchy
Gets hierarchy of the canvas tags that wraps given text.- Returns:
- list of the wrapping canvas tags. The first tag is the innermost (nearest to the text)
-
getMcid
public int getMcid()Gets the marked-content identifier associated with thisPathRenderInfo
instance- Returns:
- associated marked-content identifier or -1 in case content is unmarked
-
hasMcid
public boolean hasMcid(int mcid) Checks if the text belongs to a marked content sequence with a given mcid.- Parameters:
-
mcid
- a marked content id - Returns:
-
true
if the text is marked with this id
-
hasMcid
public boolean hasMcid(int mcid, boolean checkTheTopmostLevelOnly) Checks if the text belongs to a marked content sequence with a given mcid.- Parameters:
-
mcid
- a marked content id -
checkTheTopmostLevelOnly
- indicates whether to check the topmost level of marked content stack only - Returns:
-
true
if the text is marked with this id
-