public abstract class AbstractPathShape extends Object implements IPathShape
| Modifier and Type | Field and Description |
|---|---|
protected SvgDrawContext |
context |
protected String[] |
coordinates |
protected IOperatorConverter |
copier |
protected Map<String,String> |
properties
The properties of this shape.
|
protected boolean |
relative
Whether this is a relative operator or not.
|
| Constructor and Description |
|---|
AbstractPathShape() |
AbstractPathShape(boolean relative) |
AbstractPathShape(boolean relative,
IOperatorConverter copier) |
| Modifier and Type | Method and Description |
|---|---|
protected com.itextpdf.kernel.geom.Point |
createPoint(String coordX,
String coordY) |
abstract void |
draw()
Draws this instruction to a canvas object.
|
void |
draw(com.itextpdf.kernel.pdf.canvas.PdfCanvas canvas)
Draws this instruction to a canvas object.
|
com.itextpdf.kernel.geom.Point |
getEndingPoint()
Gets the ending point on the canvas after the path shape has been drawn
via the
IPathShape.draw(PdfCanvas) method, in SVG space coordinates. |
com.itextpdf.kernel.geom.Rectangle |
getPathShapeRectangle(com.itextpdf.kernel.geom.Point lastPoint)
Get bounding rectangle of the current path shape.
|
boolean |
isRelative()
Returns true when this shape is a relative operator.
|
protected float |
parseHorizontalLength(String length)
Parse x axis length value.
|
protected float |
parseVerticalLength(String length)
Parse y axis length value.
|
void |
setContext(SvgDrawContext context)
Set svg draw context for this shape.
|
void |
setParent(PathSvgNodeRenderer parent)
Set parent path for this shape.
|
void |
setTransform(com.itextpdf.kernel.geom.AffineTransform transform)
Sets
AffineTransform to apply before drawing the shape. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetCoordinatesprotected boolean relative
protected final IOperatorConverter copier
protected String[] coordinates
protected SvgDrawContext context
public AbstractPathShape()
public AbstractPathShape(boolean relative)
public AbstractPathShape(boolean relative,
IOperatorConverter copier)
public boolean isRelative()
IPathShapeisRelative in interface IPathShapepublic com.itextpdf.kernel.geom.Point getEndingPoint()
IPathShapeIPathShape.draw(PdfCanvas) method, in SVG space coordinates.getEndingPoint in interface IPathShapePoint representing the final point in the drawn path.
If the point does not exist or does not change null may be returned.public com.itextpdf.kernel.geom.Rectangle getPathShapeRectangle(com.itextpdf.kernel.geom.Point lastPoint)
getPathShapeRectangle in interface IPathShapelastPoint - start point for this shapepublic void draw(com.itextpdf.kernel.pdf.canvas.PdfCanvas canvas)
IPathShape
Deprecated in favour of draw() and later this method should be introduced
in this interface, along with setContext(SvgDrawContext) method. Since
canvas can be got from SvgDrawContext the PdfCanvas parameter is no more needed.
draw in interface IPathShapecanvas - to which this instruction is drawnpublic abstract void draw()
public void setParent(PathSvgNodeRenderer parent)
parent - PathSvgNodeRenderer instancepublic void setContext(SvgDrawContext context)
context - SvgDrawContext instance.public void setTransform(com.itextpdf.kernel.geom.AffineTransform transform)
AffineTransform to apply before drawing the shape.transform - AffineTransform to apply before drawingprotected float parseHorizontalLength(String length)
length - String length for parsingCopyright © 1998–2025 Apryse Group NV. All rights reserved.