Files
SourceCode/PROMS/Volian.Svg.Library/SvgCircle.cs
T

58 lines
1.6 KiB
C#

using System.Xml.Serialization;
using System.ComponentModel;
using System.Drawing;
namespace Volian.Svg.Library
{
public partial class SvgCircle : SvgShapePart
{
#region ctor
public SvgCircle() { ;}
public SvgCircle(PointF location, float radius, Color fillColor, Color lineColor, float lineWidth)
{
CX.Value = location.X;
CY.Value = location.Y;
Radius.Value = radius;
FillColor = fillColor;
LineColor = lineColor;
LineWidth = new SvgMeasurement(lineWidth);
}
#endregion
#region Location
[XmlIgnore]
public SvgMeasurement CX { get; set; } = new SvgMeasurement();
[XmlAttribute("cx")]
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public string CX_XmlSurrogate
{
get { return SvgXmlConverter<SvgMeasurement>.GetString(CX); }
set { CX = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
}
[XmlIgnore]
public SvgMeasurement CY { get; set; } = new SvgMeasurement();
[XmlAttribute("cy")]
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public string CY_XmlSurrogate
{
get { return SvgXmlConverter<SvgMeasurement>.GetString(CY); }
set { CY = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
}
#endregion
#region Radius
[XmlIgnore]
public SvgMeasurement Radius { get; set; } = new SvgMeasurement();
[XmlAttribute("r")]
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public string X_XmlSurrogate
{
get { return SvgXmlConverter<SvgMeasurement>.GetString(Radius); }
set { Radius = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
}
#endregion
}
}