Commit f541d280 authored by tebjan's avatar tebjan
Browse files

changed attribute collection key strings to reflect the original svg attribute name

parent d0c450d0
...@@ -32,8 +32,8 @@ namespace Svg ...@@ -32,8 +32,8 @@ namespace Svg
[SvgAttribute("fill")] [SvgAttribute("fill")]
public virtual SvgPaintServer Fill public virtual SvgPaintServer Fill
{ {
get { return (this.Attributes["Fill"] == null) ? SvgColourServer.NotSet : (SvgPaintServer)this.Attributes["Fill"]; } get { return (this.Attributes["fill"] == null) ? SvgColourServer.NotSet : (SvgPaintServer)this.Attributes["fill"]; }
set { this.Attributes["Fill"] = value; } set { this.Attributes["fill"] = value; }
} }
/// <summary> /// <summary>
...@@ -42,15 +42,15 @@ namespace Svg ...@@ -42,15 +42,15 @@ namespace Svg
[SvgAttribute("stroke")] [SvgAttribute("stroke")]
public virtual SvgPaintServer Stroke public virtual SvgPaintServer Stroke
{ {
get { return (this.Attributes["Stroke"] == null) ? null : (SvgPaintServer)this.Attributes["Stroke"]; } get { return (this.Attributes["stroke"] == null) ? null : (SvgPaintServer)this.Attributes["stroke"]; }
set { this.Attributes["Stroke"] = value; } set { this.Attributes["stroke"] = value; }
} }
[SvgAttribute("fill-rule")] [SvgAttribute("fill-rule")]
public virtual SvgFillRule FillRule public virtual SvgFillRule FillRule
{ {
get { return (this.Attributes["FillRule"] == null) ? SvgFillRule.NonZero : (SvgFillRule)this.Attributes["FillRule"]; } get { return (this.Attributes["fill-rule"] == null) ? SvgFillRule.NonZero : (SvgFillRule)this.Attributes["fill-rule"]; }
set { this.Attributes["FillRule"] = value; } set { this.Attributes["fill-rule"] = value; }
} }
/// <summary> /// <summary>
...@@ -59,8 +59,8 @@ namespace Svg ...@@ -59,8 +59,8 @@ namespace Svg
[SvgAttribute("fill-opacity")] [SvgAttribute("fill-opacity")]
public virtual float FillOpacity public virtual float FillOpacity
{ {
get { return (this.Attributes["FillOpacity"] == null) ? this.Opacity : (float)this.Attributes["FillOpacity"]; } get { return (this.Attributes["fill-opacity"] == null) ? this.Opacity : (float)this.Attributes["fill-opacity"]; }
set { this.Attributes["FillOpacity"] = FixOpacityValue(value); } set { this.Attributes["fill-opacity"] = FixOpacityValue(value); }
} }
/// <summary> /// <summary>
...@@ -69,43 +69,43 @@ namespace Svg ...@@ -69,43 +69,43 @@ namespace Svg
[SvgAttribute("stroke-width")] [SvgAttribute("stroke-width")]
public virtual SvgUnit StrokeWidth public virtual SvgUnit StrokeWidth
{ {
get { return (this.Attributes["StrokeWidth"] == null) ? new SvgUnit(1.0f) : (SvgUnit)this.Attributes["StrokeWidth"]; } get { return (this.Attributes["stroke-width"] == null) ? new SvgUnit(1.0f) : (SvgUnit)this.Attributes["stroke-width"]; }
set { this.Attributes["StrokeWidth"] = value; } set { this.Attributes["stroke-width"] = value; }
} }
[SvgAttribute("stroke-linecap")] [SvgAttribute("stroke-linecap")]
public virtual SvgStrokeLineCap StrokeLineCap public virtual SvgStrokeLineCap StrokeLineCap
{ {
get { return (this.Attributes["StrokeLineCap"] == null) ? SvgStrokeLineCap.Butt : (SvgStrokeLineCap)this.Attributes["StrokeLineCap"]; } get { return (this.Attributes["stroke-linecap"] == null) ? SvgStrokeLineCap.Butt : (SvgStrokeLineCap)this.Attributes["stroke-linecap"]; }
set { this.Attributes["StrokeLineCap"] = value; } set { this.Attributes["stroke-linecap"] = value; }
} }
[SvgAttribute("stroke-linejoin")] [SvgAttribute("stroke-linejoin")]
public virtual SvgStrokeLineJoin StrokeLineJoin public virtual SvgStrokeLineJoin StrokeLineJoin
{ {
get { return (this.Attributes["StrokeLineJoin"] == null) ? SvgStrokeLineJoin.Miter : (SvgStrokeLineJoin)this.Attributes["StrokeLineJoin"]; } get { return (this.Attributes["stroke-linejoin"] == null) ? SvgStrokeLineJoin.Miter : (SvgStrokeLineJoin)this.Attributes["stroke-linejoin"]; }
set { this.Attributes["StrokeLineJoin"] = value; } set { this.Attributes["stroke-linejoin"] = value; }
} }
[SvgAttribute("stroke-miterlimit")] [SvgAttribute("stroke-miterlimit")]
public virtual float StrokeMiterLimit public virtual float StrokeMiterLimit
{ {
get { return (this.Attributes["StrokeMiterLimit"] == null) ? 4.0f : (float)this.Attributes["StrokeMiterLimit"]; } get { return (this.Attributes["stroke-miterlimit"] == null) ? 4.0f : (float)this.Attributes["stroke-miterlimit"]; }
set { this.Attributes["StrokeMiterLimit"] = value; } set { this.Attributes["stroke-miterlimit"] = value; }
} }
[SvgAttribute("stroke-dasharray")] [SvgAttribute("stroke-dasharray")]
public virtual SvgUnitCollection StrokeDashArray public virtual SvgUnitCollection StrokeDashArray
{ {
get { return this.Attributes["StrokeDashArray"] as SvgUnitCollection; } get { return this.Attributes["stroke-dasharray"] as SvgUnitCollection; }
set { this.Attributes["StrokeDashArray"] = value; } set { this.Attributes["stroke-dasharray"] = value; }
} }
[SvgAttribute("stroke-dashoffset")] [SvgAttribute("stroke-dashoffset")]
public virtual SvgUnit StrokeDashOffset public virtual SvgUnit StrokeDashOffset
{ {
get { return (this.Attributes["StrokeDashOffset"] == null) ? SvgUnit.Empty : (SvgUnit)this.Attributes["StrokeDashOffset"]; } get { return (this.Attributes["stroke-dashoffset"] == null) ? SvgUnit.Empty : (SvgUnit)this.Attributes["stroke-dashoffset"]; }
set { this.Attributes["StrokeDashOffset"] = value; } set { this.Attributes["stroke-dashoffset"] = value; }
} }
/// <summary> /// <summary>
...@@ -114,8 +114,8 @@ namespace Svg ...@@ -114,8 +114,8 @@ namespace Svg
[SvgAttribute("stroke-opacity")] [SvgAttribute("stroke-opacity")]
public virtual float StrokeOpacity public virtual float StrokeOpacity
{ {
get { return (this.Attributes["StrokeOpacity"] == null) ? this.Opacity : (float)this.Attributes["StrokeOpacity"]; } get { return (this.Attributes["stroke-opacity"] == null) ? this.Opacity : (float)this.Attributes["stroke-opacity"]; }
set { this.Attributes["StrokeOpacity"] = FixOpacityValue(value); } set { this.Attributes["stroke-opacity"] = FixOpacityValue(value); }
} }
/// <summary> /// <summary>
...@@ -124,8 +124,8 @@ namespace Svg ...@@ -124,8 +124,8 @@ namespace Svg
[SvgAttribute("opacity")] [SvgAttribute("opacity")]
public virtual float Opacity public virtual float Opacity
{ {
get { return (this.Attributes["Opacity"] == null) ? 1.0f : (float)this.Attributes["Opacity"]; } get { return (this.Attributes["opacity"] == null) ? 1.0f : (float)this.Attributes["opacity"]; }
set { this.Attributes["Opacity"] = FixOpacityValue(value); } set { this.Attributes["opacity"] = FixOpacityValue(value); }
} }
} }
} }
\ No newline at end of file
...@@ -238,14 +238,14 @@ namespace Svg ...@@ -238,14 +238,14 @@ namespace Svg
[SvgAttribute("transform")] [SvgAttribute("transform")]
public SvgTransformCollection Transforms public SvgTransformCollection Transforms
{ {
get { return (this.Attributes.GetAttribute<SvgTransformCollection>("Transforms")); } get { return (this.Attributes.GetAttribute<SvgTransformCollection>("transform")); }
set set
{ {
var old = this.Transforms; var old = this.Transforms;
if(old != null) if(old != null)
old.TransformChanged -= Attributes_AttributeChanged; old.TransformChanged -= Attributes_AttributeChanged;
value.TransformChanged += Attributes_AttributeChanged; value.TransformChanged += Attributes_AttributeChanged;
this.Attributes["Transforms"] = value; this.Attributes["transform"] = value;
} }
} }
...@@ -256,7 +256,7 @@ namespace Svg ...@@ -256,7 +256,7 @@ namespace Svg
[SvgAttribute("id")] [SvgAttribute("id")]
public string ID public string ID
{ {
get { return this.Attributes.GetAttribute<string>("ID"); } get { return this.Attributes.GetAttribute<string>("id"); }
set set
{ {
SetAndFixID(value, false); SetAndFixID(value, false);
...@@ -276,7 +276,7 @@ namespace Svg ...@@ -276,7 +276,7 @@ namespace Svg
this.OwnerDocument.IdManager.Remove(this); this.OwnerDocument.IdManager.Remove(this);
} }
this.Attributes["ID"] = value; this.Attributes["id"] = value;
if (this.OwnerDocument != null) if (this.OwnerDocument != null)
{ {
...@@ -290,7 +290,7 @@ namespace Svg ...@@ -290,7 +290,7 @@ namespace Svg
/// <param name="newID"></param> /// <param name="newID"></param>
internal void FixID(string newID) internal void FixID(string newID)
{ {
this.Attributes["ID"] = newID; this.Attributes["id"] = newID;
} }
/// <summary> /// <summary>
......
...@@ -213,8 +213,8 @@ namespace Svg ...@@ -213,8 +213,8 @@ namespace Svg
/// <value>The fill.</value> /// <value>The fill.</value>
public override SvgPaintServer Fill public override SvgPaintServer Fill
{ {
get { return (this.Attributes["Fill"] == null) ? new SvgColourServer(Color.Black) : (SvgPaintServer)this.Attributes["Fill"]; } get { return (this.Attributes["fill"] == null) ? new SvgColourServer(Color.Black) : (SvgPaintServer)this.Attributes["Fill"]; }
set { this.Attributes["Fill"] = value; } set { this.Attributes["fill"] = value; }
} }
/// <summary> /// <summary>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment