Table of Contents

Class AbstractSvgNodeRenderer

Namespace
iText.Svg.Renderers.Impl
Assembly
itext.svg.dll

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

IDictionary<string, string>

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

ISvgNodeRenderer

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 ISvgNodeRenderer

renderer 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 SvgDrawContext

the 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 SvgDrawContext

the 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

string

GetAttributeMapCopy()

public virtual IDictionary<string, string> GetAttributeMapCopy()

Returns

IDictionary<string, string>

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 string

the name of the property to search for

defaultValue string

the 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

Rectangle

GetParent()

public virtual ISvgNodeRenderer GetParent()

Returns

ISvgNodeRenderer

ParseAbsoluteLength(string, float, float, SvgDrawContext)

Parse length attributes.

protected virtual float ParseAbsoluteLength(string length, float percentBaseValue, float defaultValue, SvgDrawContext context)

Parameters

length string

string for parsing

percentBaseValue float

the value on which percent length is based on

defaultValue float

default value if length is not recognized

context SvgDrawContext

current SvgDrawContext

Returns

float

absolute value in points

SetAttribute(string, string)

public virtual void SetAttribute(string key, string value)

Parameters

key string
value string

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