public class PolylineSvgNodeRenderer extends AbstractSvgNodeRenderer implements IMarkerCapable
ISvgNodeRenderer implementation for the <polyline> tag.| Modifier and Type | Field and Description |
|---|---|
protected List<com.itextpdf.kernel.geom.Point> |
points
A List of
Point objects representing the path to be drawn by the polyline tag |
attributesAndStyles| Constructor and Description |
|---|
PolylineSvgNodeRenderer() |
| Modifier and Type | Method and Description |
|---|---|
ISvgNodeRenderer |
createDeepCopy()
Creates a deep copy of this renderer, including it's subtree of children
|
protected void |
doDraw(SvgDrawContext context)
Draws this element to a canvas-like object maintained in the context.
|
void |
drawMarker(SvgDrawContext context,
MarkerVertexType markerVertexType)
Draws a marker in the specified context.
|
double |
getAutoOrientAngle(MarkerSvgNodeRenderer marker,
boolean reverse)
Calculates marker orientation angle if
orient attribute is set to auto |
com.itextpdf.kernel.geom.Rectangle |
getObjectBoundingBox(SvgDrawContext context)
Calculates the current object bounding box.
|
protected List<com.itextpdf.kernel.geom.Point> |
getPoints() |
protected void |
setPoints(String pointsAttribute)
Parses a string of space separated x,y pairs into individual
Point objects and appends them topoints. |
canConstructViewPort, canElementFill, deepCopyAttributesAndStyles, draw, getAttribute, getAttributeMapCopy, getAttributeOrDefault, getCurrentFontSize, getParent, parseAbsoluteLength, setAttribute, setAttributesAndStyles, setParentprotected List<com.itextpdf.kernel.geom.Point> points
Point objects representing the path to be drawn by the polyline tagprotected List<com.itextpdf.kernel.geom.Point> getPoints()
protected void setPoints(String pointsAttribute)
Point objects and appends them topoints.
Throws an SvgProcessingException if pointsAttribute does not have a valid list of numerical x,y pairs.pointsAttribute - A string of space separated x,y value pairspublic com.itextpdf.kernel.geom.Rectangle getObjectBoundingBox(SvgDrawContext context)
ISvgNodeRenderergetObjectBoundingBox in interface ISvgNodeRenderercontext - the current context, for instance it contains current viewport and available
font dataRectangle representing the current object's bounding box, or null
if bounding box is undefinedprotected void doDraw(SvgDrawContext context)
doDraw in class AbstractSvgNodeRenderercontext - the object that knows the place to draw this element and maintains its statepublic ISvgNodeRenderer createDeepCopy()
ISvgNodeRenderercreateDeepCopy in interface ISvgNodeRendererpublic void drawMarker(SvgDrawContext context, MarkerVertexType markerVertexType)
IMarkerCapabledrawMarker in interface IMarkerCapablecontext - the object that knows the place to draw this element and maintains its statemarkerVertexType - type of marker that determine on which vertices of the given element
marker should be drawnpublic double getAutoOrientAngle(MarkerSvgNodeRenderer marker, boolean reverse)
IMarkerCapableorient attribute is set to autogetAutoOrientAngle in interface IMarkerCapablemarker - marker for which the rotation angle should be calculatedreverse - indicates that the resulting angle should be rotated 180 degreesCopyright © 1998–2024 Apryse Group NV. All rights reserved.