Class AbstractPathShape
java.lang.Object
com.itextpdf.svg.renderers.path.impl.AbstractPathShape
- All Implemented Interfaces:
-
IPathShape
- Direct Known Subclasses:
-
CurveTo
,EllipticalCurveTo
,LineTo
,MoveTo
,QuadraticCurveTo
This class handles common behaviour in IPathShape implementations
-
Field Summary
Modifier and TypeFieldDescriptionprotected String[]
protected final IOperatorConverter
The properties of this shape.protected boolean
Whether this is a relative operator or not. -
Constructor Summary
ConstructorDescriptionAbstractPathShape
(boolean relative) AbstractPathShape
(boolean relative, IOperatorConverter copier) -
Method Summary
Modifier and TypeMethodDescriptionprotected Point
createPoint
(String coordX, String coordY) Gets the ending point on the canvas after the path shape has been drawn via theIPathShape.draw(PdfCanvas)
method, in SVG space coordinates.getPathShapeRectangle
(Point lastPoint) Get bounding rectangle of the current path shape.boolean
Returns true when this shape is a relative operator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.itextpdf.svg.renderers.path.IPathShape
draw, setCoordinates
-
Field Details
-
properties
The properties of this shape. -
relative
protected boolean relativeWhether this is a relative operator or not. -
copier
-
coordinates
-
-
Constructor Details
-
AbstractPathShape
public AbstractPathShape() -
AbstractPathShape
public AbstractPathShape(boolean relative) -
AbstractPathShape
-
-
Method Details
-
isRelative
public boolean isRelative()Description copied from interface:IPathShape
Returns true when this shape is a relative operator. False if it is an absolute operator.- Specified by:
-
isRelative
in interfaceIPathShape
- Returns:
- true if relative, false if absolute
-
createPoint
-
getEndingPoint
Description copied from interface:IPathShape
Gets the ending point on the canvas after the path shape has been drawn via theIPathShape.draw(PdfCanvas)
method, in SVG space coordinates.- Specified by:
-
getEndingPoint
in interfaceIPathShape
- Returns:
-
The
Point
representing the final point in the drawn path. If the point does not exist or does not changenull
may be returned.
-
getPathShapeRectangle
Get bounding rectangle of the current path shape.- Specified by:
-
getPathShapeRectangle
in interfaceIPathShape
- Parameters:
-
lastPoint
- start point for this shape - Returns:
- calculated rectangle
-