48 lines
1.6 KiB
C#
48 lines
1.6 KiB
C#
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace Volian.Svg.Library
|
|
{
|
|
public partial class SvgGroup : SvgPartInheritance
|
|
{
|
|
#region Description
|
|
[System.ComponentModel.DefaultValueAttribute("")]
|
|
[XmlElement("desc")]
|
|
public string Description { get; set; } = string.Empty;
|
|
#endregion
|
|
#region Title
|
|
[System.ComponentModel.DefaultValueAttribute("")]
|
|
[XmlElement("title")]
|
|
public string Title { get; set; } = string.Empty;
|
|
#endregion
|
|
#region Parts
|
|
// SVG Parts
|
|
[XmlElement("use", typeof(SvgUse))]
|
|
[XmlElement("image", typeof(SvgImage))]
|
|
[XmlElement("text", typeof(SvgText))]
|
|
[XmlElement("line", typeof(SvgLine))]
|
|
[XmlElement("circle", typeof(SvgCircle))]
|
|
[XmlElement("rect", typeof(SvgRectangle))]
|
|
[XmlElement("ellipse", typeof(SvgEllipse))]
|
|
[XmlElement("svg", typeof(Svg))]
|
|
[XmlElement("g", typeof(SvgGroup))]
|
|
[XmlElement("defs", typeof(SvgDefine))]
|
|
public SvgParts SvgParts { get; set; } = new SvgParts();
|
|
public SvgPart Add(SvgPart svgPart)
|
|
{
|
|
SvgParts.Add(svgPart);
|
|
return svgPart;
|
|
}
|
|
public void RemoveAt(int i) => SvgParts.RemoveAt(i);
|
|
public int Count => SvgParts.Count;
|
|
#endregion
|
|
#region Dictionary of Parts
|
|
internal override void AddLookup(Dictionary<string, SvgPart> lookUp)
|
|
{
|
|
base.AddLookup(lookUp);
|
|
SvgParts.AddLookup(lookUp);
|
|
}
|
|
#endregion
|
|
public override string ToString() => ID;
|
|
}
|
|
} |