Package com.itextpdf.svg.renderers.impl
Class PdfRootSvgNodeRenderer
java.lang.Object
com.itextpdf.svg.renderers.impl.PdfRootSvgNodeRenderer
- All Implemented Interfaces:
-
ISvgNodeRenderer
Root renderer responsible for applying the initial axis-flipping transform
-
Constructor Summary
ConstructorDescriptionPdfRootSvgNodeRenderer
(ISvgNodeRenderer subTreeRoot) Creates aPdfRootSvgNodeRenderer
instance. -
Method Summary
Modifier and TypeMethodDescriptionCreates a deep copy of this renderer, including it's subtree of childrenvoid
draw
(SvgDrawContext context) Draws this element to a canvas-like object maintained in the context.getAttribute
(String key) Retrieves the property value for a given key name.Get a modifiable copy of the style and attribute mapgetObjectBoundingBox
(SvgDrawContext context) Calculates the current object bounding box.Gets the parent of this renderer.void
setAttribute
(String key, String value) Sets a property key and value pairs for a given attributevoid
setAttributesAndStyles
(Map<String, String> attributesAndStyles) Sets the map of XML node attributes and CSS style properties that this renderer needs.void
setParent
(ISvgNodeRenderer parent) Sets the parent of this renderer.
-
Constructor Details
-
PdfRootSvgNodeRenderer
Creates aPdfRootSvgNodeRenderer
instance.- Parameters:
-
subTreeRoot
- root of the subtree
-
-
Method Details
-
setParent
Description copied from interface:ISvgNodeRenderer
Sets the parent of this renderer. The parent may be the source of inherited properties and default values.- Specified by:
-
setParent
in interfaceISvgNodeRenderer
- Parameters:
-
parent
- the parent renderer
-
getParent
Description copied from interface:ISvgNodeRenderer
Gets the parent of this renderer. The parent may be the source of inherited properties and default values.- Specified by:
-
getParent
in interfaceISvgNodeRenderer
- Returns:
- the parent renderer; null in case of a root node
-
draw
Description copied from interface:ISvgNodeRenderer
Draws this element to a canvas-like object maintained in the context.- Specified by:
-
draw
in interfaceISvgNodeRenderer
- Parameters:
-
context
- the object that knows the place to draw this element and maintains its state
-
setAttributesAndStyles
Description copied from interface:ISvgNodeRenderer
Sets the map of XML node attributes and CSS style properties that this renderer needs.- Specified by:
-
setAttributesAndStyles
in interfaceISvgNodeRenderer
- Parameters:
-
attributesAndStyles
- the mapping from key names to values
-
getAttribute
Description copied from interface:ISvgNodeRenderer
Retrieves the property value for a given key name.- Specified by:
-
getAttribute
in interfaceISvgNodeRenderer
- Parameters:
-
key
- the name of the property to search for - Returns:
-
the value for this key, or
null
-
setAttribute
Description copied from interface:ISvgNodeRenderer
Sets a property key and value pairs for a given attribute- Specified by:
-
setAttribute
in interfaceISvgNodeRenderer
- Parameters:
-
key
- the name of the attribute -
value
- the value of the attribute
-
getAttributeMapCopy
Description copied from interface:ISvgNodeRenderer
Get a modifiable copy of the style and attribute map- Specified by:
-
getAttributeMapCopy
in interfaceISvgNodeRenderer
- Returns:
- copy of the attributes and styles-map
-
getObjectBoundingBox
Description copied from interface:ISvgNodeRenderer
Calculates the current object bounding box.- Specified by:
-
getObjectBoundingBox
in interfaceISvgNodeRenderer
- 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
-
createDeepCopy
Description copied from interface:ISvgNodeRenderer
Creates a deep copy of this renderer, including it's subtree of children- Specified by:
-
createDeepCopy
in interfaceISvgNodeRenderer
- Returns:
- deep copy of this renderer
-