Class EllipticalCurveTo
java.lang.Object
com.itextpdf.svg.renderers.path.impl.AbstractPathShape
com.itextpdf.svg.renderers.path.impl.EllipticalCurveTo
- All Implemented Interfaces:
-
IPathShape
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 https://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes 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.
-
Field Summary
Fields inherited from class com.itextpdf.svg.renderers.path.impl.AbstractPathShape
context, coordinates, copier, properties, relative -
Constructor Summary
ConstructorsConstructorDescriptionCreates an absolute Elliptical curveTo.EllipticalCurveTo(boolean relative) Creates a Elliptical curveTo. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw()Draws this instruction to a canvas object.getPathShapeRectangle(Point lastPoint) Get bounding rectangle of the current path shape.voidsetCoordinates(String[] inputCoordinates, Point previous) This method sets the coordinates for the path painting operator and does internal preprocessing, if necessaryMethods inherited from class com.itextpdf.svg.renderers.path.impl.AbstractPathShape
createPoint, draw, getEndingPoint, isRelative, parseHorizontalLength, parseVerticalLength, setContext, setParent, setTransform
-
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.- Parameters:
-
relative- whether this is a relative EllipticalCurveTo or not
-
-
Method Details
-
setCoordinates
Description copied from interface:IPathShapeThis 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 -
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()Description copied from class:AbstractPathShapeDraws this instruction to a canvas object.- Specified by:
-
drawin classAbstractPathShape
-
getPathShapeRectangle
Description copied from class:AbstractPathShapeGet bounding rectangle of the current path shape.- Specified by:
-
getPathShapeRectanglein interfaceIPathShape - Overrides:
-
getPathShapeRectanglein classAbstractPathShape - Parameters:
-
lastPoint- start point for this shape - Returns:
- calculated rectangle
-