Class SmoothOperatorConverter

java.lang.Object
com.itextpdf.svg.renderers.path.impl.SmoothOperatorConverter
All Implemented Interfaces:
IOperatorConverter

class SmoothOperatorConverter extends Object implements IOperatorConverter
Implementation of IOperatorConverter specifically for smooth curves. It will convert all operators from relative to absolute coordinates except the first coordinate pair. This implementation is used by the Smooth (Shorthand) Bézier curve commands, because the conversion of the first coordinate pair is calculated in PathSvgNodeRenderer.getShapeCoordinates(com.itextpdf.svg.renderers.path.IPathShape, com.itextpdf.svg.renderers.path.IPathShape, java.lang.String[]).
  • Constructor Details

    • SmoothOperatorConverter

      SmoothOperatorConverter()
  • Method Details

    • makeCoordinatesAbsolute

      public String[] makeCoordinatesAbsolute(String[] relativeCoordinates, double[] initialPoint)
      Description copied from interface: IOperatorConverter
      Convert an array of relative coordinates to an array with the same size containing absolute coordinates.
      Specified by:
      makeCoordinatesAbsolute in interface IOperatorConverter
      Parameters:
      relativeCoordinates - the initial set of coordinates
      initialPoint - an array representing the point relative to which the relativeCoordinates are defined
      Returns:
      a String array of absolute coordinates, with the same length as the input array