Package com.itextpdf.svg.renderers.impl
Class UseSvgNodeRenderer
- java.lang.Object
-
- com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
-
- com.itextpdf.svg.renderers.impl.UseSvgNodeRenderer
-
- All Implemented Interfaces:
ISvgNodeRenderer
public class UseSvgNodeRenderer extends AbstractSvgNodeRenderer
Renderer implementing the use tag. This tag allows you to reuse previously defined elements.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
AbstractSvgNodeRenderer.FillProperties, AbstractSvgNodeRenderer.StrokeProperties
-
-
Field Summary
-
Fields inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
attributesAndStyles, doFill, doStroke
-
-
Constructor Summary
Constructors Constructor Description UseSvgNodeRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISvgNodeRenderercreateDeepCopy()Creates a deep copy of this renderer, including it's subtree of childrenprotected voiddoDraw(SvgDrawContext context)Draws this element to a canvas-like object maintained in the context.RectanglegetObjectBoundingBox(SvgDrawContext context)Calculates the current object bounding box.private booleanisValidHref(java.lang.String name)(package private) voidpostDraw(SvgDrawContext context)Operations to be performed after drawing the element.-
Methods inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
applyFillAndStrokeProperties, applyNonScalingStrokeTransform, calculateViewPortTranslation, canConstructViewPort, canElementFill, deepCopyAttributesAndStyles, doStrokeOrFill, draw, getAttribute, getAttributeMapCopy, getAttributeOrDefault, getCurrentFontSize, getCurrentFontSize, getCurrentViewBox, getParent, getParentClipPath, isHidden, parseAbsoluteLength, parseHorizontalLength, parseVerticalLength, preDraw, retrieveAlignAndMeet, setAttribute, setAttributesAndStyles, setParent
-
-
-
-
Method Detail
-
doDraw
protected void doDraw(SvgDrawContext context)
Description copied from class:AbstractSvgNodeRendererDraws this element to a canvas-like object maintained in the context.- Specified by:
doDrawin classAbstractSvgNodeRenderer- Parameters:
context- the object that knows the place to draw this element and maintains its state
-
postDraw
void postDraw(SvgDrawContext context)
Description copied from class:AbstractSvgNodeRendererOperations to be performed after drawing the element. This includes filling, stroking.- Overrides:
postDrawin classAbstractSvgNodeRenderer- Parameters:
context- the svg draw context
-
isValidHref
private boolean isValidHref(java.lang.String name)
-
createDeepCopy
public ISvgNodeRenderer createDeepCopy()
Description copied from interface:ISvgNodeRendererCreates a deep copy of this renderer, including it's subtree of children- Returns:
- deep copy of this renderer
-
getObjectBoundingBox
public Rectangle getObjectBoundingBox(SvgDrawContext context)
Description copied from interface:ISvgNodeRendererCalculates the current object bounding box.- Parameters:
context- the current context, for instance it contains current viewport and available font data- Returns:
- the
Rectanglerepresenting the current object's bounding box, or null if bounding box is undefined
-
-