Class SvgTextBase
- Namespace
- Svg
- Assembly
- Svg.dll
public abstract class SvgTextBase : SvgVisualElement, ISvgTransformable, ICloneable, ISvgNode, ISvgStylable, ISvgBoundable, ISvgClipable
- Inheritance
-
SvgTextBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
SvgTextBase()
public SvgTextBase()
Properties
Bounds
Gets the bounds of the element.
public override RectangleF Bounds { get; }
Property Value
- RectangleF
The bounds.
Dx
Gets or sets the dX.
public virtual SvgUnitCollection Dx { get; set; }
Property Value
- SvgUnitCollection
The dX.
Dy
Gets or sets the dY.
public virtual SvgUnitCollection Dy { get; set; }
Property Value
- SvgUnitCollection
The dY.
Fill
Gets or sets the fill.
public override SvgPaintServer Fill { get; set; }
Property Value
- SvgPaintServer
The fill.
Remarks
Unlike other SvgVisualElements, SvgText has a default fill of black rather than transparent.
LengthAdjust
Gets or sets the text anchor.
public virtual SvgTextLengthAdjust LengthAdjust { get; set; }
Property Value
- SvgTextLengthAdjust
The text anchor.
LetterSpacing
Specifies spacing behavior between text characters.
public virtual SvgUnit LetterSpacing { get; set; }
Property Value
Rotate
Gets or sets the rotate.
public virtual string Rotate { get; set; }
Property Value
- string
The rotate.
SpaceHandling
Gets or sets the space handling.
public override XmlSpaceHandling SpaceHandling { set; }
Property Value
- XmlSpaceHandling
The space handling.
Text
Gets or sets the text to be rendered.
public virtual string Text { get; set; }
Property Value
TextLength
The pre-calculated length of the text
public virtual SvgUnit TextLength { get; set; }
Property Value
WordSpacing
Specifies spacing behavior between words.
public virtual SvgUnit WordSpacing { get; set; }
Property Value
X
Gets or sets the X.
public virtual SvgUnitCollection X { get; set; }
Property Value
- SvgUnitCollection
The X.
Y
Gets or sets the Y.
public virtual SvgUnitCollection Y { get; set; }
Property Value
- SvgUnitCollection
The Y.
Methods
DeepCopy<T>()
public override SvgElement DeepCopy<T>() where T : SvgElement, new()
Returns
Type Parameters
T
GetAuthorPathLength()
protected virtual float GetAuthorPathLength()
Returns
GetBaselinePath(ISvgRenderer)
protected virtual GraphicsPath GetBaselinePath(ISvgRenderer renderer)
Parameters
renderer
ISvgRenderer
Returns
OnChange(string, string)
protected void OnChange(string newString, string sessionID)
Parameters
Path(ISvgRenderer)
Gets the GraphicsPath for this element.
public override GraphicsPath Path(ISvgRenderer renderer)
Parameters
renderer
ISvgRenderer
Returns
PrepareText(string)
Prepare the text according to the whitespace handling rules and text transformations. SVG Spec.
protected string PrepareText(string value)
Parameters
value
stringText to be prepared
Returns
- string
Prepared text
RaiseChange(object, StringArg)
protected void RaiseChange(object sender, StringArg s)
Parameters
RegisterEvents(ISvgEventCaller)
Use this method to provide your implementation ISvgEventCaller which can register Actions and call them if one of the events occurs. Make sure, that your SvgElement has a unique ID. The SvgTextElement overwrites this and registers the Change event tor its text content.
public override void RegisterEvents(ISvgEventCaller caller)
Parameters
caller
ISvgEventCaller
RenderFillAndStroke(ISvgRenderer)
protected override void RenderFillAndStroke(ISvgRenderer renderer)
Parameters
renderer
ISvgRenderer
ShouldWriteElement()
Empty text elements are not legal - only write this element if it has children.
public override bool ShouldWriteElement()
Returns
ToString()
public override string ToString()
Returns
UnregisterEvents(ISvgEventCaller)
Use this method to provide your implementation ISvgEventCaller to unregister Actions
public override void UnregisterEvents(ISvgEventCaller caller)
Parameters
caller
ISvgEventCaller
Events
Change
public event EventHandler<StringArg> Change