Class AbstractSvgNodeRenderer
ISvgNodeRenderer abstract implementation.
public abstract class AbstractSvgNodeRenderer : ISvgNodeRenderer
- Inheritance
-
AbstractSvgNodeRenderer
- Implements
- Derived
- Inherited Members
Constructors
AbstractSvgNodeRenderer()
protected AbstractSvgNodeRenderer()
Fields
attributesAndStyles
Map that contains attributes and styles used for drawing operations.
protected IDictionary<string, string> attributesAndStyles
Field Value
Methods
CanConstructViewPort()
Method to see if the renderer can create a viewport
public virtual bool CanConstructViewPort()
Returns
- bool
true if the renderer can construct a viewport
CanElementFill()
Method to see if a certain renderer can use fill.
protected virtual bool CanElementFill()
Returns
- bool
true if the renderer can use fill
CreateDeepCopy()
public abstract ISvgNodeRenderer CreateDeepCopy()
Returns
DeepCopyAttributesAndStyles(ISvgNodeRenderer)
Make a deep copy of the styles and attributes of this renderer Helper method for deep copying logic
protected virtual void DeepCopyAttributesAndStyles(ISvgNodeRenderer deepCopy)
Parameters
deepCopy
ISvgNodeRendererrenderer to insert the deep copied attributes into
DoDraw(SvgDrawContext)
Draws this element to a canvas-like object maintained in the context.
protected abstract void DoDraw(SvgDrawContext context)
Parameters
context
SvgDrawContextthe object that knows the place to draw this element and maintains its state
Draw(SvgDrawContext)
Applies transformations set to this object, if any, and delegates the drawing of this element and its children to the doDraw method.
public void Draw(SvgDrawContext context)
Parameters
context
SvgDrawContextthe object that knows the place to draw this element and maintains its state
GetAttribute(string)
public virtual string GetAttribute(string key)
Parameters
key
string
Returns
GetAttributeMapCopy()
public virtual IDictionary<string, string> GetAttributeMapCopy()
Returns
GetAttributeOrDefault(string, string)
Retrieves the property value for a given key name or default if the property value is null or missing.
public virtual string GetAttributeOrDefault(string key, string defaultValue)
Parameters
key
stringthe name of the property to search for
defaultValue
stringthe default value to be returned if the property is null or missing
Returns
- string
the value for this key, or
defaultValue
GetCurrentFontSize()
Return font-size of the current element
public virtual float GetCurrentFontSize()
Returns
- float
absolute value of font-size
GetObjectBoundingBox(SvgDrawContext)
public abstract Rectangle GetObjectBoundingBox(SvgDrawContext arg1)
Parameters
arg1
SvgDrawContext
Returns
GetParent()
public virtual ISvgNodeRenderer GetParent()
Returns
ParseAbsoluteLength(string, float, float, SvgDrawContext)
Parse length attributes.
protected virtual float ParseAbsoluteLength(string length, float percentBaseValue, float defaultValue, SvgDrawContext context)
Parameters
length
stringstring for parsing
percentBaseValue
floatthe value on which percent length is based on
defaultValue
floatdefault value if length is not recognized
context
SvgDrawContextcurrent SvgDrawContext
Returns
- float
absolute value in points
SetAttribute(string, string)
public virtual void SetAttribute(string key, string value)
Parameters
SetAttributesAndStyles(IDictionary<string, string>)
public virtual void SetAttributesAndStyles(IDictionary<string, string> attributesAndStyles)
Parameters
attributesAndStyles
IDictionary<string, string>
SetParent(ISvgNodeRenderer)
public virtual void SetParent(ISvgNodeRenderer parent)
Parameters
parent
ISvgNodeRenderer