Class PathRenderInfo

  • All Implemented Interfaces:
    IEventData

    public class PathRenderInfo
    extends AbstractRenderInfo
    Contains information relating to painting current path.
    • Field Detail

      • NO_OP

        public static final int NO_OP
        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
        See Also:
        Constant Field Values
      • STROKE

        public static final int STROKE
        Value specifying stroke operation to perform on the current path.
        See Also:
        Constant Field Values
      • FILL

        public static final int FILL
        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.
        See Also:
        Constant Field Values
      • path

        private Path path
      • operation

        private int operation
      • rule

        private int rule
      • isClip

        private boolean isClip
      • clippingRule

        private int clippingRule
      • canvasTagHierarchy

        private java.util.List<CanvasTag> canvasTagHierarchy
        Hierarchy of nested canvas tags for the text from the most inner (nearest to text) tag to the most outer.
    • Method Detail

      • getPath

        public Path getPath()
        Gets the Path to be rendered
        Returns:
        the Path to be rendered
      • getOperation

        public int getOperation()
        Gets the int value which is either NO_OP or one of possible combinations of STROKE and FILL.
        Returns:
        the operation value
      • isPathModifiesClippingPath

        public boolean isPathModifiesClippingPath()
        Gets the clipping path flag.
        Returns:
        true indicates that current path modifies the clipping path
      • getCtm

        public Matrix 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
      • getMiterLimit

        public float getMiterLimit()
        Gets the miter limit.
        Returns:
        the miter limit
      • getLineDashPattern

        public PdfArray getLineDashPattern()
        Gets the path's dash pattern.
        Returns:
        the path's dash pattern as a PdfArray
      • getStrokeColor

        public Color getStrokeColor()
        Gets the path's stroke color.
        Returns:
        the path's stroke color
      • getFillColor

        public Color getFillColor()
        Gets the path's fill color.
        Returns:
        the path's fill color
      • getCanvasTagHierarchy

        public java.util.List<CanvasTag> 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 this PathRenderInfo instance
        Returns:
        associated marked-content identifier or -1 in case content is unmarked
      • hasMcid

        public boolean hasMcid​(int mcid)
        Checks if this PathRenderInfo instance belongs to a marked content sequence with a given mcid.
        Parameters:
        mcid - a marked content id
        Returns:
        true if this PathRenderInfo instance is marked with this id, false otherwise
      • hasMcid

        public boolean hasMcid​(int mcid,
                               boolean checkTheTopmostLevelOnly)
        Checks if this PathRenderInfo instance 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 this PathRenderInfo instance is marked with this id, false otherwise