Interface IPathShape

All Known Implementing Classes:
AbstractPathShape, ClosePath, CurveTo, EllipticalCurveTo, HorizontalLineTo, LineTo, MoveTo, QuadraticCurveTo, QuadraticSmoothCurveTo, SmoothSCurveTo, VerticalLineTo

public interface IPathShape
Interface for IPathShape, which draws the Path-data's d element instructions.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    draw(PdfCanvas canvas)
    Draws this instruction to a canvas object.
    Gets the ending point on the canvas after the path shape has been drawn via the draw(PdfCanvas) method, in SVG space coordinates.
    Get bounding rectangle of the current path shape.
    boolean
    Returns true when this shape is a relative operator.
    void
    setCoordinates(String[] inputCoordinates, Point startPoint)
    This method sets the coordinates for the path painting operator and does internal preprocessing, if necessary
  • Method Details

    • draw

      void draw (PdfCanvas canvas)
      Draws this instruction to a canvas object.
      Parameters:
      canvas - to which this instruction is drawn
    • setCoordinates

      void setCoordinates (String[] inputCoordinates, Point startPoint)
      This method sets the coordinates for the path painting operator and does internal preprocessing, if necessary
      Parameters:
      inputCoordinates - an array containing point values for path coordinates
      startPoint - the ending point of the previous operator, or, in broader terms, the point that the coordinates should be absolutized against, for relative operators
    • getEndingPoint

      Point getEndingPoint()
      Gets the ending point on the canvas after the path shape has been drawn via the draw(PdfCanvas) method, in SVG space coordinates.
      Returns:
      The Point representing the final point in the drawn path. If the point does not exist or does not change null may be returned.
    • isRelative

      boolean isRelative()
      Returns true when this shape is a relative operator. False if it is an absolute operator.
      Returns:
      true if relative, false if absolute
    • getPathShapeRectangle

      Rectangle getPathShapeRectangle (Point lastPoint)
      Get bounding rectangle of the current path shape.
      Parameters:
      lastPoint - start point for this shape
      Returns:
      calculated rectangle