Class SvgDefs
Represents a SVG 'defs' element that can contain definitions for reuse by other elements.
Inherited Members
Namespace: OpenSvg.SvgNodes
Assembly: OpenSvg.dll
Syntax
public class SvgDefs : SvgElement, IXmlSerializable, IEquatable<SvgElement>, ISvgElementContainer
Properties
| Edit this page View SourceChildElements
Declaration
public List<SvgStyle> ChildElements { get; set; }
Property Value
Type | Description |
---|---|
List<SvgStyle> |
SvgName
Gets or sets the name of the SVG element.
Declaration
public override string SvgName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
| Edit this page View SourceAdd(SvgElement)
Adds a child element to the current element.
Declaration
public void Add(SvgElement child)
Parameters
Type | Name | Description |
---|---|---|
SvgElement | child | The child element to add. |
Add(SvgStyle)
Declaration
public void Add(SvgStyle svgStyle)
Parameters
Type | Name | Description |
---|---|---|
SvgStyle | svgStyle |
AddEmbeddedFont(SvgFont)
Adds an embedded font to the SVG definitions.
Declaration
public void AddEmbeddedFont(SvgFont svgFont)
Parameters
Type | Name | Description |
---|---|---|
SvgFont | svgFont | The font to embed. |
Children()
Gets the children of the current element.
Declaration
public IEnumerable<SvgElement> Children()
Returns
Type | Description |
---|---|
IEnumerable<SvgElement> | An enumerable of SvgElement containing the children of the current element. |
Descendants()
Returns an enumerable of SvgElement containing the descendants (children and their children down to the leaf level) of the specified type.
Declaration
public IEnumerable<SvgElement> Descendants()
Returns
Type | Description |
---|---|
IEnumerable<SvgElement> | An enumerable of SvgElement containing the descendants of the specified type. |