41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using System.Drawing;
|
|
using System.ComponentModel;
|
|
|
|
namespace Volian.Svg.Library
|
|
{
|
|
[TypeConverter(typeof(ExpandableObjectConverter))]
|
|
public abstract class SvgShapePart : SvgLinePart
|
|
{
|
|
#region Fill Settings
|
|
protected SvgFillSettings _MyFillSettings = new SvgFillSettings();
|
|
[System.ComponentModel.DefaultValueAttribute("")]
|
|
[XmlAttribute("fill")]
|
|
public string Fill
|
|
{
|
|
get { return _MyFillSettings.Fill; }
|
|
set { _MyFillSettings.Fill = value; }
|
|
}
|
|
[XmlIgnore]
|
|
public Color FillColor
|
|
{
|
|
get
|
|
{
|
|
if (_MyFillSettings.Fill.ToUpper() == "NONE") return _MyFillSettings.FillColor;
|
|
return Svg.OverrideColor != System.Drawing.Color.Empty ? Svg.OverrideColor : _MyFillSettings.FillColor;
|
|
}
|
|
|
|
set { _MyFillSettings.FillColor = value; }
|
|
}
|
|
#endregion
|
|
#region Setup Inheritance
|
|
override internal void SetupInheritance(SvgInheritedSettings myParentsSettings)
|
|
{
|
|
base.SetupInheritance(myParentsSettings);
|
|
_MyFillSettings.MyParentsSettings = myParentsSettings.MyFillSettings;
|
|
}
|
|
#endregion
|
|
}
|
|
} |