|
// --------------------------------------------------------------------------------
// Name: SvgEllipse
//
// Author: Maurizio Bigoloni <big71@fastwebnet.it>
// See the ReleaseNote.txt file for copyright and license information.
//
// Remarks:
//
// --------------------------------------------------------------------------------
using System;
using System.ComponentModel;
namespace SVGLib
{
/// <summary>
/// It represents the ellipse SVG element.
/// </summary>
public class SvgEllipse : SvgBasicShape
{
/// <summary>
/// The x-axis coordinate of the center of the ellipse.
/// </summary>
[Category("(Specific)")]
[Description("The x-axis coordinate of the center of the ellipse.")]
public string CX
{
get
{
return GetAttributeStringValue(SvgAttribute._SvgAttribute.attrSpecific_CX);
}
set
{
SetAttributeValue(SvgAttribute._SvgAttribute.attrSpecific_CX, value);
}
}
/// <summary>
/// The y-axis coordinate of the center of the ellipse.
/// </summary>
[Category("(Specific)")]
[Description("The y-axis coordinate of the center of the ellipse.")]
public string CY
{
get
{
return GetAttributeStringValue(SvgAttribute._SvgAttribute.attrSpecific_CY);
}
set
{
SetAttributeValue(SvgAttribute._SvgAttribute.attrSpecific_CY, value);
}
}
/// <summary>
/// The x-axis radius of the ellipse.
/// </summary>
[Category("(Specific)")]
[Description("The x-axis radius of the ellipse.")]
public string RX
{
get
{
return GetAttributeStringValue(SvgAttribute._SvgAttribute.attrSpecific_RX);
}
set
{
SetAttributeValue(SvgAttribute._SvgAttribute.attrSpecific_RX, value);
}
}
/// <summary>
/// The y-axis radius of the ellipse.
/// </summary>
[Category("(Specific)")]
[Description("The y-axis radius of the ellipse.")]
public string RY
{
get
{
return GetAttributeStringValue(SvgAttribute._SvgAttribute.attrSpecific_RY);
}
set
{
SetAttributeValue(SvgAttribute._SvgAttribute.attrSpecific_RY, value);
}
}
/// <summary>
/// It constructs an ellipse element with no attribute.
/// </summary>
/// <param name="doc">SVG document.</param>
public SvgEllipse(SvgDoc doc):base(doc)
{
Init();
}
/// <summary>
/// It constructs an ellipse element.
/// </summary>
/// <param name="doc">SVG document.</param>
/// <param name="sCX"></param>
/// <param name="sCY"></param>
/// <param name="sRX"></param>
/// <param name="sRY"></param>
public SvgEllipse(SvgDoc doc, string sCX, string sCY, string sRX, string sRY):base(doc)
{
Init();
CX = sCX;
CY = sCY;
RX = sRX;
RY = sRY;
}
private void Init()
{
m_sElementName = "ellipse";
m_ElementType = _SvgElementType.typeEllipse;
AddAttr(SvgAttribute._SvgAttribute.attrSpecific_CX, "");
AddAttr(SvgAttribute._SvgAttribute.attrSpecific_CY, "");
AddAttr(SvgAttribute._SvgAttribute.attrSpecific_RX, "");
AddAttr(SvgAttribute._SvgAttribute.attrSpecific_RY, "");
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
He is a Microsoft technology enthusiast, who wish to create applications which others find useful.He loves making small tools and getting involved in architecting bigger systems.
He is currently working as a professional developer in a software development firm in .Net technologies.
He likes reading technical blogs, contributing to opensource and most importantly, enjoying life.
His ambition is to be an impressive software maker.