Class EllipticalCurveTo

All Implemented Interfaces:

public class EllipticalCurveTo extends AbstractPathShape
Implements elliptical curveTo (A) segment of SVG's path element. Implemented in PDF as Bézier curves. Edge cases & value correction below always refer to For some calculations we need double precision floating point math, so we have forced all calculations to use double. However, float comparison is used instead of double comparison, because close coordinates can be considered equal.
  • Constructor Details

    • EllipticalCurveTo

      public EllipticalCurveTo()
      Creates an absolute Elliptical curveTo.
    • EllipticalCurveTo

      public EllipticalCurveTo (boolean relative)
      Creates a Elliptical curveTo. Set argument to true to create a relative EllipticalCurveTo.
      relative - whether this is a relative EllipticalCurveTo or not
  • Method Details

    • setCoordinates

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

      public void draw (PdfCanvas canvas)
      Description copied from interface: IPathShape
      Draws this instruction to a canvas object.
      canvas - to which this instruction is drawn
    • getPathShapeRectangle

      public Rectangle getPathShapeRectangle (Point lastPoint)
      Description copied from class: AbstractPathShape
      Get bounding rectangle of the current path shape.
      Specified by:
      getPathShapeRectangle in interface IPathShape
      getPathShapeRectangle in class AbstractPathShape
      lastPoint - start point for this shape
      calculated rectangle