Interface ISvgNodeRenderer
Interface for SvgNodeRenderer, the renderer draws the SVG to its Pdf-canvas passed in SvgDrawContext , applying styling (CSS and attributes).
public interface ISvgNodeRenderer
Methods
CreateDeepCopy()
Creates a deep copy of this renderer, including it's subtree of children
ISvgNodeRenderer CreateDeepCopy()
Returns
- ISvgNodeRenderer
deep copy of this renderer
Draw(SvgDrawContext)
Draws this element to a canvas-like object maintained in the context.
void Draw(SvgDrawContext context)
Parameters
context
SvgDrawContextthe object that knows the place to draw this element and maintains its state
GetAttribute(string)
Retrieves the property value for a given key name.
string GetAttribute(string key)
Parameters
key
stringthe name of the property to search for
Returns
GetAttributeMapCopy()
Get a modifiable copy of the style and attribute map
IDictionary<string, string> GetAttributeMapCopy()
Returns
- IDictionary<string, string>
copy of the attributes and styles-map
GetObjectBoundingBox(SvgDrawContext)
Calculates the current object bounding box.
Rectangle GetObjectBoundingBox(SvgDrawContext context)
Parameters
context
SvgDrawContextthe current context, for instance it contains current viewport and available font data
Returns
- Rectangle
the Rectangle representing the current object's bounding box, or null if bounding box is undefined
GetParent()
Gets the parent of this renderer.
ISvgNodeRenderer GetParent()
Returns
- ISvgNodeRenderer
the parent renderer; null in case of a root node
Remarks
Gets the parent of this renderer. The parent may be the source of inherited properties and default values.
SetAttribute(string, string)
Sets a property key and value pairs for a given attribute
void SetAttribute(string key, string value)
Parameters
SetAttributesAndStyles(IDictionary<string, string>)
Sets the map of XML node attributes and CSS style properties that this renderer needs.
void SetAttributesAndStyles(IDictionary<string, string> attributesAndStyles)
Parameters
attributesAndStyles
IDictionary<string, string>the mapping from key names to values
SetParent(ISvgNodeRenderer)
Sets the parent of this renderer.
void SetParent(ISvgNodeRenderer parent)
Parameters
parent
ISvgNodeRendererthe parent renderer
Remarks
Sets the parent of this renderer. The parent may be the source of inherited properties and default values.