Class QuadraticCurveTo

java.lang.Object
com.itextpdf.svg.renderers.path.impl.AbstractPathShape
com.itextpdf.svg.renderers.path.impl.QuadraticCurveTo
All Implemented Interfaces:
IControlPointCurve, IPathShape
Direct Known Subclasses:
QuadraticSmoothCurveTo

public class QuadraticCurveTo extends AbstractPathShape implements IControlPointCurve
Implements quadratic Bezier curveTo(Q) attribute of SVG's path element
  • Constructor Details

    • QuadraticCurveTo

      public QuadraticCurveTo()
    • QuadraticCurveTo

      public QuadraticCurveTo (boolean relative)
    • QuadraticCurveTo

      public QuadraticCurveTo (boolean relative, IOperatorConverter copier)
  • Method Details

    • draw

      public void draw (PdfCanvas canvas)
      Draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point
      Specified by:
      draw in interface IPathShape
      Parameters:
      canvas - to which this instruction is drawn
    • setCoordinates

      public void setCoordinates (String[] inputCoordinates, Point startPoint)
      Description copied from interface: IPathShape
      This method sets the coordinates for the path painting operator and does internal preprocessing, if necessary
      Specified by:
      setCoordinates in interface IPathShape
      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
    • getLastControlPoint

      public Point getLastControlPoint()
      Description copied from interface: IControlPointCurve
      Returns coordinates of the last control point (the one closest to the ending point) in the Bezier curve, in SVG space coordinates
      Specified by:
      getLastControlPoint in interface IControlPointCurve
      Returns:
      coordinates of the last control point in SVG space coordinates
    • 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
      Overrides:
      getPathShapeRectangle in class AbstractPathShape
      Parameters:
      lastPoint - start point for this shape
      Returns:
      calculated rectangle