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
coordinates, copier, properties, relative
-
Constructor Summary
ConstructorDescriptionCreates an absolute Elliptical curveTo.EllipticalCurveTo
(boolean relative) Creates a Elliptical curveTo. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Draws this instruction to a canvas object.getPathShapeRectangle
(Point lastPoint) Get bounding rectangle of the current path shape.void
setCoordinates
(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, getEndingPoint, isRelative
-
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:IPathShape
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 -
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
Description copied from interface:IPathShape
Draws this instruction to a canvas object.- Parameters:
-
canvas
- to which this instruction is drawn
-
getPathShapeRectangle
Description copied from class:AbstractPathShape
Get bounding rectangle of the current path shape.- Specified by:
-
getPathShapeRectangle
in interfaceIPathShape
- Overrides:
-
getPathShapeRectangle
in classAbstractPathShape
- Parameters:
-
lastPoint
- start point for this shape - Returns:
- calculated rectangle
-