Package com.itextpdf.svg.renderers.impl
Class MarkerSvgNodeRenderer
java.lang.Object
com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
com.itextpdf.svg.renderers.impl.AbstractBranchSvgNodeRenderer
com.itextpdf.svg.renderers.impl.MarkerSvgNodeRenderer
- All Implemented Interfaces:
IBranchSvgNodeRenderer
,ISvgNodeRenderer
ISvgNodeRenderer
implementation for the <marker> tag.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final float
private static final float
private static final float
private static final float
Fields inherited from class com.itextpdf.svg.renderers.impl.AbstractBranchSvgNodeRenderer
VIEWBOX_VALUES_NUMBER
Fields inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
attributesAndStyles, doFill, doStroke, partOfClipPath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
(package private) void
applyMarkerAttributes
(SvgDrawContext context) private void
applyRotation
(SvgDrawContext context) private void
applyUserSpaceScaling
(SvgDrawContext context) protected void
applyViewBox
(SvgDrawContext context) Applies a transformation based on a viewBox for a given branch node.Creates a deep copy of this renderer, including it's subtree of children(package private) static void
drawMarker
(SvgDrawContext context, String moveX, String moveY, MarkerVertexType markerToUse, AbstractSvgNodeRenderer parent) private float[]
getObjectBoundingBox
(SvgDrawContext context) Calculates the current object bounding box.private float[]
getViewBoxValues
(float defaultWidth, float defaultHeight) private static boolean
markerWidthHeightAreCorrect
(MarkerSvgNodeRenderer namedObject) (package private) void
preDraw
(SvgDrawContext context) Operations to perform before drawing an element.Methods inherited from class com.itextpdf.svg.renderers.impl.AbstractBranchSvgNodeRenderer
addChild, addXObject, calculateAndApplyViewBox, deepCopyChildren, doDraw, getChildren, getViewBoxValues, postDraw, processAspectRatioPosition, retrieveAlignAndMeet, setPartOfClipPath
Methods inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
calculateViewPortTranslation, canConstructViewPort, canElementFill, deepCopyAttributesAndStyles, draw, getAttribute, getAttributeMapCopy, getAttributeOrDefault, getCurrentFontSize, getParent, parseAbsoluteLength, setAttribute, setAttributesAndStyles, setParent
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.ISvgNodeRenderer
draw, getAttribute, getAttributeMapCopy, getParent, setAttribute, setAttributesAndStyles, setParent
-
Field Details
-
DEFAULT_MARKER_WIDTH
private static final float DEFAULT_MARKER_WIDTH- See Also:
-
DEFAULT_MARKER_HEIGHT
private static final float DEFAULT_MARKER_HEIGHT- See Also:
-
DEFAULT_REF_X
private static final float DEFAULT_REF_X- See Also:
-
DEFAULT_REF_Y
private static final float DEFAULT_REF_Y- See Also:
-
-
Constructor Details
-
MarkerSvgNodeRenderer
public MarkerSvgNodeRenderer()
-
-
Method Details
-
createDeepCopy
Description copied from interface:ISvgNodeRenderer
Creates a deep copy of this renderer, including it's subtree of children- Specified by:
createDeepCopy
in interfaceISvgNodeRenderer
- Specified by:
createDeepCopy
in classAbstractBranchSvgNodeRenderer
- Returns:
- deep copy of this renderer
-
getObjectBoundingBox
Description copied from interface:ISvgNodeRenderer
Calculates the current object bounding box.- Parameters:
context
- the current context, for instance it contains current viewport and available font data- Returns:
- the
Rectangle
representing the current object's bounding box, or null if bounding box is undefined
-
preDraw
Description copied from class:AbstractSvgNodeRenderer
Operations to perform before drawing an element. This includes setting stroke color and width, fill color.- Overrides:
preDraw
in classAbstractSvgNodeRenderer
- Parameters:
context
- the svg draw context
-
applyMarkerAttributes
-
drawMarker
static void drawMarker(SvgDrawContext context, String moveX, String moveY, MarkerVertexType markerToUse, AbstractSvgNodeRenderer parent) -
applyViewBox
Description copied from class:AbstractBranchSvgNodeRenderer
Applies a transformation based on a viewBox for a given branch node.- Overrides:
applyViewBox
in classAbstractBranchSvgNodeRenderer
- Parameters:
context
- current svg draw context
-
getMarkerWidthHeightValues
private float[] getMarkerWidthHeightValues() -
markerWidthHeightAreCorrect
-
applyRotation
-
applyUserSpaceScaling
-
applyCoordinatesTranslation
-
getViewBoxValues
private float[] getViewBoxValues(float defaultWidth, float defaultHeight)
-