You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
|
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
using GeoSigma.SigmaDrawerStyle;
|
|
|
|
|
|
using GeoSigma.SigmaDrawerStyle.Converter;
|
|
|
|
|
|
using GeoSigmaDrawLib;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SigmaDrawerElement
|
|
|
|
|
|
{
|
|
|
|
|
|
public class DrawerCircle : ElementBase
|
|
|
|
|
|
{
|
|
|
|
|
|
public DrawerCircle()
|
|
|
|
|
|
{
|
|
|
|
|
|
ElementType = DrawElementType.ELEMENT_CIRCLE;
|
|
|
|
|
|
}
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
[XmlAttribute("Color")]
|
|
|
|
|
|
public int ColorRef;
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category("\t基本"), DisplayName("\t颜色")]
|
|
|
|
|
|
public Color LineColor
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return ColorTranslator.FromWin32(ColorRef);
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
ColorRef = ColorTranslator.ToWin32(value);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private PropertyPoint center = new PropertyPoint();
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category("\t基本"), DisplayName("\t\t\t\t\t圆心坐标")]
|
|
|
|
|
|
public PropertyPoint Center
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
center.X = BaseData.X;
|
|
|
|
|
|
center.Y = BaseData.Y;
|
|
|
|
|
|
return center;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
BaseData.X = value.X;
|
|
|
|
|
|
BaseData.Y = value.Y;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category("\t基本"), DisplayName("\t\t\t\t半径")]
|
|
|
|
|
|
[TypeConverter(typeof(DoubleTrimConverter))]
|
|
|
|
|
|
public double R // 用外半径替代的,需要修改
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return BaseData.R;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
BaseData.R = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlElement("Base")]
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public CircleBase BaseData { get; set; } = new CircleBase();
|
|
|
|
|
|
}
|
|
|
|
|
|
public class CircleBase
|
|
|
|
|
|
{
|
|
|
|
|
|
[XmlAttribute]
|
|
|
|
|
|
public double X { get; set; }
|
|
|
|
|
|
[XmlAttribute]
|
|
|
|
|
|
public double Y { get; set; }
|
|
|
|
|
|
[XmlAttribute]
|
|
|
|
|
|
public double Z { get; set; }
|
|
|
|
|
|
[XmlAttribute]
|
|
|
|
|
|
public double R { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|