Back to top OpenSVG (c) Veridict AB, www.veridict.com
Edit this page

Class SvgVisualContainer

Represents a visual SVG element that can contain other element as children.

Inheritance
object
SvgElement
SvgVisual
SvgVisualContainer
SvgDocument
SvgGroup
Implements
IXmlSerializable
IEquatable<SvgElement>
ISvgElementContainer
Inherited Members
SvgVisual.fillColor
SvgVisual.strokeColor
SvgVisual.strokeWidth
SvgVisual.transform
SvgVisual.FillColor
SvgVisual.StrokeColor
SvgVisual.StrokeWidth
SvgVisual.Transform
SvgVisual.DrawConfig
SvgVisual.ConvexHull
SvgVisual.BoundingBox
SvgVisual.AlignRelativeTo(SvgVisual, HorizontalAlignment?, VerticalAlignment?)
SvgElement.SvgName
SvgElement.id
SvgElement.ID
SvgElement.RootDocument
SvgElement.Root
SvgElement.Parent
SvgElement.ViewPort
SvgElement.ViewPortWidth
SvgElement.ViewPortHeight
SvgElement.GetSchema()
SvgElement.WriteXml(XmlWriter)
SvgElement.ReadXml(XmlReader)
SvgElement.ToSvgGroup()
SvgElement.ToSvgDocument()
SvgElement.Attributes()
SvgElement.Equals(object)
SvgElement.Equals(SvgElement)
SvgElement.InformedEquals(SvgElement)
SvgElement.GetHashCode()
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OpenSvg.SvgNodes
Assembly: OpenSvg.dll
Syntax
public abstract class SvgVisualContainer : SvgVisual, IXmlSerializable, IEquatable<SvgElement>, ISvgElementContainer

Properties

| Edit this page View Source

ChildElements

Gets or sets the child elements of this SvgVisualContainer.

Declaration
public List<SvgElement> ChildElements { get; set; }
Property Value
Type Description
List<SvgElement>
Remarks

This property holds a list of child SvgElement instances.

Methods

| Edit this page View Source

Add(SvgElement)

Adds a SvgElement as a child of this SvgVisualContainer.

Declaration
public void Add(SvgElement svgElement)
Parameters
Type Name Description
SvgElement svgElement
| Edit this page View Source

AddAll(IEnumerable<SvgElement>)

Adds a collection of SvgElement as children of this SvgVisualContainer.

Declaration
public void AddAll(IEnumerable<SvgElement> svgElements)
Parameters
Type Name Description
IEnumerable<SvgElement> svgElements

The collection of SvgElement to add.

| Edit this page View Source

AddChildWithAlignment(SvgVisual, HorizontalAlignment, VerticalAlignment)

Adds an SvgVisual child inside this SvgVisualContainer with specified horizontal and vertical alignment.

Declaration
public void AddChildWithAlignment(SvgVisual child, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment)
Parameters
Type Name Description
SvgVisual child

The SvgVisual child to add.

HorizontalAlignment horizontalAlignment

The horizontal alignment for the child, in relation to its new parent.

VerticalAlignment verticalAlignment

The vertical alignment for the child in relation, in relation to its new parent.

Remarks

Alignment is calculated relative to the bounding boxes of parent and child, when the add is made. Later changes to the bounding boxes of the parent or the child will not trigger a recalculation of the alignment.

| Edit this page View Source

Children()

Retrieves the children of this SvgVisualContainer.

Declaration
public IEnumerable<SvgElement> Children()
Returns
Type Description
IEnumerable<SvgElement>

An enumerable of SvgElement representing the direct children.

| Edit this page View Source

ComputeConvexHull()

Protected method to compute the non-transformed convex hull of this SvgVisual element.

Declaration
protected override ConvexHull ComputeConvexHull()
Returns
Type Description
ConvexHull
Overrides
SvgVisual.ComputeConvexHull()
| Edit this page View Source

Descendants()

Retrieves all descendant elements of this SvgVisualContainer.

Declaration
public IEnumerable<SvgElement> Descendants()
Returns
Type Description
IEnumerable<SvgElement>

An enumerable of SvgElement representing the descendants.

Implements

IXmlSerializable
IEquatable<T>
ISvgElementContainer