Class CurveTo
java.lang.Object
com.itextpdf.svg.renderers.path.impl.AbstractPathShape
com.itextpdf.svg.renderers.path.impl.CurveTo
- All Implemented Interfaces:
-
IControlPointCurve
,IPathShape
- Direct Known Subclasses:
-
SmoothSCurveTo
Implements curveTo(C) attribute of SVG's path element.
-
Field Summary
Fields inherited from class com.itextpdf.svg.renderers.path.impl.AbstractPathShape
context, coordinates, copier, properties, relative
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw()
Draws this instruction to a canvas object.Returns coordinates of the last control point (the one closest to the ending point) in the Bezier curve, in SVG space coordinatesgetPathShapeRectangle
(Point lastPoint) Get bounding rectangle of the current path shape.void
setCoordinates
(String[] inputCoordinates, Point startPoint) 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
-
CurveTo
public CurveTo()Creates newCurveTo
instance. -
CurveTo
public CurveTo(boolean relative) Creates newCurveTo
instance.- Parameters:
-
relative
-true
in case it is a relative operator,false
if it is an absolute operator
-
CurveTo
Creates newCurveTo
instance.- Parameters:
-
relative
-true
in case it is a relative operator,false
if it is an absolute operator -
copier
-IOperatorConverter
copier for converting relative coordinates to absolute coordinates
-
-
Method Details
-
draw
public void draw()Description copied from class:AbstractPathShape
Draws this instruction to a canvas object.- Specified by:
-
draw
in classAbstractPathShape
-
setCoordinates
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 interfaceIPathShape
- 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
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 interfaceIControlPointCurve
- Returns:
- coordinates of the last control point in SVG space coordinates
-
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
-