public override void Setup_BeforeAdd(XML xml)
{
string str;
string type = xml.GetAttribute("type");
if (type != null && type != "empty")
{
_shape = new Shape();
_shape.gOwner = this;
displayObject = _shape;
}
base.Setup_BeforeAdd(xml);
if (_shape != null)
{
int lineSize;
str = xml.GetAttribute("lineSize");
if (str != null)
lineSize = int.Parse(str);
else
lineSize = 1;
Color lineColor;
str = xml.GetAttribute("lineColor");
if (str != null)
lineColor = ToolSet.ConvertFromHtmlColor(str);
else
lineColor = Color.black;
Color fillColor;
str = xml.GetAttribute("fillColor");
if (str != null)
fillColor = ToolSet.ConvertFromHtmlColor(str);
else
fillColor = Color.white;
if (type == "rect")
DrawRect(this.width, this.height, lineSize, lineColor, fillColor);
else
DrawEllipse(this.width, this.height, fillColor);
}
}