Commit f03ac5bd authored by tebjan's avatar tebjan
Browse files

avg fragment now fires attribute changed events

parent 4d631e7f
...@@ -14,11 +14,6 @@ namespace Svg ...@@ -14,11 +14,6 @@ namespace Svg
[SvgElement("svg")] [SvgElement("svg")]
public class SvgFragment : SvgElement, ISvgViewPort public class SvgFragment : SvgElement, ISvgViewPort
{ {
private SvgUnit _width;
private SvgUnit _height;
private SvgViewBox _viewBox;
private SvgAspectRatio _aspect;
/// <summary> /// <summary>
/// Gets the SVG namespace string. /// Gets the SVG namespace string.
/// </summary> /// </summary>
...@@ -31,8 +26,8 @@ namespace Svg ...@@ -31,8 +26,8 @@ namespace Svg
[SvgAttribute("width")] [SvgAttribute("width")]
public SvgUnit Width public SvgUnit Width
{ {
get { return this._width; } get { return this.Attributes.GetAttribute<SvgUnit>("width"); }
set { this._width = value; } set { this.Attributes["width"] = value; }
} }
/// <summary> /// <summary>
...@@ -42,8 +37,8 @@ namespace Svg ...@@ -42,8 +37,8 @@ namespace Svg
[SvgAttribute("height")] [SvgAttribute("height")]
public SvgUnit Height public SvgUnit Height
{ {
get { return this._height; } get { return this.Attributes.GetAttribute<SvgUnit>("height"); }
set { this._height = value; } set { this.Attributes["height"] = value; }
} }
[SvgAttribute("overflow")] [SvgAttribute("overflow")]
...@@ -60,8 +55,8 @@ namespace Svg ...@@ -60,8 +55,8 @@ namespace Svg
[SvgAttribute("viewBox")] [SvgAttribute("viewBox")]
public SvgViewBox ViewBox public SvgViewBox ViewBox
{ {
get { return this._viewBox; } get { return this.Attributes.GetAttribute<SvgViewBox>("viewBox"); }
set { this._viewBox = value; } set { this.Attributes["viewBox"] = value; }
} }
/// <summary> /// <summary>
...@@ -71,8 +66,8 @@ namespace Svg ...@@ -71,8 +66,8 @@ namespace Svg
[SvgAttribute("preserveAspectRatio")] [SvgAttribute("preserveAspectRatio")]
public SvgAspectRatio AspectRatio public SvgAspectRatio AspectRatio
{ {
get { return this._aspect; } get {return this.Attributes.GetAttribute<SvgAspectRatio>("preserveAspectRatio"); }
set { this._aspect = value; } set { this.Attributes["preserveAspectRatio"] = value; }
} }
/// <summary> /// <summary>
...@@ -117,7 +112,6 @@ namespace Svg ...@@ -117,7 +112,6 @@ namespace Svg
{ {
return this.Path.GetBounds(); return this.Path.GetBounds();
} }
} }
/// <summary> /// <summary>
...@@ -125,8 +119,8 @@ namespace Svg ...@@ -125,8 +119,8 @@ namespace Svg
/// </summary> /// </summary>
public SvgFragment() public SvgFragment()
{ {
this._height = new SvgUnit(SvgUnitType.Percentage, 100.0f); this.Height = new SvgUnit(SvgUnitType.Percentage, 100.0f);
this._width = new SvgUnit(SvgUnitType.Percentage, 100.0f); this.Width = new SvgUnit(SvgUnitType.Percentage, 100.0f);
this.ViewBox = SvgViewBox.Empty; this.ViewBox = SvgViewBox.Empty;
this.AspectRatio = new SvgAspectRatio(SvgPreserveAspectRatio.None); this.AspectRatio = new SvgAspectRatio(SvgPreserveAspectRatio.None);
} }
......
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