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
Implements quadratic Bezier curveTo(Q) 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
ConstructorsConstructorDescriptionCreates newQuadraticCurveToinstance.QuadraticCurveTo(boolean relative) Creates newQuadraticCurveToinstance.QuadraticCurveTo(boolean relative, IOperatorConverter copier) Creates newQuadraticCurveToinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw()Draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control pointReturns 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.voidsetCoordinates(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
-
QuadraticCurveTo
public QuadraticCurveTo()Creates newQuadraticCurveToinstance. -
QuadraticCurveTo
public QuadraticCurveTo(boolean relative) Creates newQuadraticCurveToinstance.- Parameters:
-
relative-truein case it is a relative operator,falseif it is an absolute operator
-
QuadraticCurveTo
Creates newQuadraticCurveToinstance.- Parameters:
-
relative-truein case it is a relative operator,falseif it is an absolute operator -
copier-IOperatorConvertercopier for converting relative coordinates to absolute coordinates
-
-
Method Details
-
draw
public void draw()Draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point- Specified by:
-
drawin classAbstractPathShape
-
setCoordinates
Description copied from interface:IPathShapeThis method sets the coordinates for the path painting operator and does internal preprocessing, if necessary- Specified by:
-
setCoordinatesin 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:IControlPointCurveReturns coordinates of the last control point (the one closest to the ending point) in the Bezier curve, in SVG space coordinates- Specified by:
-
getLastControlPointin interfaceIControlPointCurve - Returns:
- coordinates of the last control point in SVG space coordinates
-
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
-