diff --git a/Source/Basic Shapes/SvgCircle.cs b/Source/Basic Shapes/SvgCircle.cs index 8864a56089f63ca28c48ef11812bf6bb7af41d3d..5c28b92273d2181a60827a332b5b1d80ce79cbaf 100644 --- a/Source/Basic Shapes/SvgCircle.cs +++ b/Source/Basic Shapes/SvgCircle.cs @@ -96,6 +96,10 @@ namespace Svg } return _path; } + protected set + { + _path = value; + } } /// diff --git a/Source/Basic Shapes/SvgEllipse.cs b/Source/Basic Shapes/SvgEllipse.cs index 4cce3f323e9a359a09a36a4b44e96f287160de42..fab8d382b24c06197e30bbb85094e9ab123b4c17 100644 --- a/Source/Basic Shapes/SvgEllipse.cs +++ b/Source/Basic Shapes/SvgEllipse.cs @@ -95,6 +95,10 @@ namespace Svg } return _path; } + protected set + { + _path = value; + } } /// diff --git a/Source/Basic Shapes/SvgImage.cs b/Source/Basic Shapes/SvgImage.cs index 8262128859af67847fdeac6718e2d3bd9cd51488..cea49e828e9f4ed825e498562895008041c3ab77 100644 --- a/Source/Basic Shapes/SvgImage.cs +++ b/Source/Basic Shapes/SvgImage.cs @@ -84,6 +84,9 @@ namespace Svg { return null; } + protected set + { + } } /// diff --git a/Source/Basic Shapes/SvgLine.cs b/Source/Basic Shapes/SvgLine.cs index baa2c9f9f23be6eeb08623574312a658dba0050e..6ccd6918d86b6c9220708ca29f41ad1f6384f225 100644 --- a/Source/Basic Shapes/SvgLine.cs +++ b/Source/Basic Shapes/SvgLine.cs @@ -75,6 +75,10 @@ namespace Svg } return this._path; } + protected set + { + _path = value; + } } public override System.Drawing.RectangleF Bounds diff --git a/Source/Basic Shapes/SvgPolygon.cs b/Source/Basic Shapes/SvgPolygon.cs index 44a0b9207f7fa2b5aa16aec6a47ed4f167b2ddcf..9773c6b12937a6da587ab56c18ae2502d1b9b3aa 100644 --- a/Source/Basic Shapes/SvgPolygon.cs +++ b/Source/Basic Shapes/SvgPolygon.cs @@ -14,8 +14,8 @@ namespace Svg [SvgElement("polygon")] public class SvgPolygon : SvgVisualElement { - protected GraphicsPath _path; - protected SvgUnitCollection _points; + private GraphicsPath _path; + private SvgUnitCollection _points; /// /// The points that make up the SvgPolygon @@ -68,6 +68,10 @@ namespace Svg } return this._path; } + protected set + { + _path = value; + } } public override RectangleF Bounds diff --git a/Source/Basic Shapes/SvgPolyline.cs b/Source/Basic Shapes/SvgPolyline.cs index e8b63d170d24a3b9693c8e06efcd5211387afebb..c645656a1b1e528cb8eece1a590117b171ecd410 100644 --- a/Source/Basic Shapes/SvgPolyline.cs +++ b/Source/Basic Shapes/SvgPolyline.cs @@ -17,24 +17,24 @@ namespace Svg { get { - if (this._path == null || this.IsPathDirty) + if (Path == null || this.IsPathDirty) { - this._path = new GraphicsPath(); + Path = new GraphicsPath(); try { - for (int i = 0; i < this._points.Count; i += 2) + for (int i = 0; i < Points.Count; i += 2) { - PointF endPoint = new PointF(this._points[i].ToDeviceValue(this), this._points[i + 1].ToDeviceValue(this)); + PointF endPoint = new PointF(Points[i].ToDeviceValue(this), Points[i + 1].ToDeviceValue(this)); // TODO: Remove unrequired first line - if (_path.PointCount == 0) + if (Path.PointCount == 0) { - _path.AddLine(endPoint, endPoint); + Path.AddLine(endPoint, endPoint); } else { - _path.AddLine(_path.GetLastPoint(), endPoint); + Path.AddLine(Path.GetLastPoint(), endPoint); } } } @@ -44,7 +44,7 @@ namespace Svg } this.IsPathDirty = false; } - return this._path; + return Path; } } } diff --git a/Source/Basic Shapes/SvgRectangle.cs b/Source/Basic Shapes/SvgRectangle.cs index 048c1db48da046887059394c8fa41800a6ee3f07..fd02b24f12a26a143857749193ddb3089643884c 100644 --- a/Source/Basic Shapes/SvgRectangle.cs +++ b/Source/Basic Shapes/SvgRectangle.cs @@ -247,6 +247,10 @@ namespace Svg } return _path; } + protected set + { + _path = value; + } } /// diff --git a/Source/Basic Shapes/SvgVisualElement.cs b/Source/Basic Shapes/SvgVisualElement.cs index cb6b404b3cafae271763351b80b3f4daab0a9e8a..2fae3f3257374328f894c3971768bf07baf88835 100644 --- a/Source/Basic Shapes/SvgVisualElement.cs +++ b/Source/Basic Shapes/SvgVisualElement.cs @@ -22,7 +22,7 @@ namespace Svg /// /// Gets the for this element. /// - public abstract GraphicsPath Path { get; } + public abstract GraphicsPath Path { get; protected set; } /// /// Gets the bounds of the element. /// diff --git a/Source/DataTypes/SvgFontWeight.cs b/Source/DataTypes/SvgFontWeight.cs index 227b3bfd8da266c57b8ebc4b3d67c0b1a24a219b..0fe1b0db2b97833087f9d10613740551e198218f 100644 --- a/Source/DataTypes/SvgFontWeight.cs +++ b/Source/DataTypes/SvgFontWeight.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Text; namespace Svg.DataTypes { diff --git a/Source/DataTypes/SvgUnit.cs b/Source/DataTypes/SvgUnit.cs index 86dd7e8a3ffee1ac2fb3371d399cc02eece52cd6..cf5c6cc66dea7861eb15e9390ae5518210c779fa 100644 --- a/Source/DataTypes/SvgUnit.cs +++ b/Source/DataTypes/SvgUnit.cs @@ -100,7 +100,7 @@ namespace Svg // http://www.w3.org/TR/SVG11/coords.html#Units const float cmInInch = 2.54f; - int ppi = SvgDocument.PPI; + int ppi = SvgDocument.PointsPerInch; switch (this.Type) { diff --git a/Source/Document Structure/SvgGroup.cs b/Source/Document Structure/SvgGroup.cs index c3b740ad1bcd400373564454d6679e60c3ab45b4..160d1f5db5daea4b27feb70f5ac9eb4ba0cdc3fc 100644 --- a/Source/Document Structure/SvgGroup.cs +++ b/Source/Document Structure/SvgGroup.cs @@ -27,12 +27,13 @@ namespace Svg { get { - var path = new GraphicsPath(); - + //var path = new GraphicsPath(); //AddPaths(this, path); return GetPaths(this); } + protected set + { } } /// diff --git a/Source/Document Structure/SvgUse.cs b/Source/Document Structure/SvgUse.cs index 65938d66df11534dbdb154bb8bdf874cda5e2a21..b7e1634643367b73b5602a5b311ecf2a6c4af3fe 100644 --- a/Source/Document Structure/SvgUse.cs +++ b/Source/Document Structure/SvgUse.cs @@ -58,6 +58,8 @@ namespace Svg SvgVisualElement element = (SvgVisualElement)this.OwnerDocument.IdManager.GetElementById(this.ReferencedElement); return (element != null) ? element.Path : null; } + protected set + { } } public override System.Drawing.RectangleF Bounds diff --git a/Source/Painting/SvgMarker.cs b/Source/Painting/SvgMarker.cs index cbe354aa35748dfeb4e1d597d3f1f9e1cd20af4d..f254d5824849b69606fb8a94725e5df378075852 100644 --- a/Source/Painting/SvgMarker.cs +++ b/Source/Painting/SvgMarker.cs @@ -70,6 +70,10 @@ namespace Svg return (path as SvgPath).Path; return null; } + protected set + { + // No-op + } } public override System.Drawing.RectangleF Bounds diff --git a/Source/Paths/SvgPath.cs b/Source/Paths/SvgPath.cs index 0393f057b8a1857faac4ff5677b052f69bdbe0f9..fa8749d94c0ee7f711936a8179974057c0140ef7 100644 --- a/Source/Paths/SvgPath.cs +++ b/Source/Paths/SvgPath.cs @@ -89,6 +89,10 @@ namespace Svg } return _path; } + protected set + { + _path = value; + } } internal void OnPathUpdated() diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs index f9fa9cf8f338ca6cc30744694dac805aeb4a24e8..349f4f5cd2152f71e2b2520ccc0f0e8214be5be3 100644 --- a/Source/Properties/AssemblyInfo.cs +++ b/Source/Properties/AssemblyInfo.cs @@ -1,4 +1,5 @@ -using System.Reflection; +using System; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -31,5 +32,7 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.1.*")] -[assembly: AssemblyFileVersion("1.0.1.*")] +[assembly: AssemblyVersion("1.5.1.*")] +//[assembly: AssemblyFileVersion("1.0.1.*")] + +[assembly: CLSCompliant(true)] diff --git a/Source/Svg.csproj b/Source/Svg.csproj index 93f9fee134736cdd74a791b233ceb9209c5173b3..36906139e0c700d4f50e994f1d2c186318cd1b3f 100644 --- a/Source/Svg.csproj +++ b/Source/Svg.csproj @@ -54,7 +54,9 @@ 4 AllRules.ruleset true - ..\..\vvvv\public\common\src\thirdparty\Svg.XML + + + true PdbOnly diff --git a/Source/SvgAttributeCollection.cs b/Source/SvgAttributeCollection.cs index 0c504d07e5eee5237ed1a592176644159938c75a..303fccaeb49ccbd0d817fb09a811b45bd40881a9 100644 --- a/Source/SvgAttributeCollection.cs +++ b/Source/SvgAttributeCollection.cs @@ -108,7 +108,7 @@ namespace Svg /// public event EventHandler AttributeChanged; - protected void OnAttributeChanged(string attribute, object value) + private void OnAttributeChanged(string attribute, object value) { var handler = AttributeChanged; if(handler != null) @@ -164,7 +164,7 @@ namespace Svg /// public event EventHandler AttributeChanged; - protected void OnAttributeChanged(string attribute, object value) + private void OnAttributeChanged(string attribute, object value) { var handler = AttributeChanged; if(handler != null) diff --git a/Source/SvgDocument.cs b/Source/SvgDocument.cs index 81c98760c29cb2d85c7f3321baf2ab45e913e1e3..c35f6dedfe52599d54e00937b9722bf7ee8ce1ac 100644 --- a/Source/SvgDocument.cs +++ b/Source/SvgDocument.cs @@ -16,7 +16,7 @@ namespace Svg /// public class SvgDocument : SvgFragment, ITypeDescriptorContext { - public static readonly int PPI = 96; + public static readonly int PointsPerInch = 96; private SvgElementIdManager _idManager; diff --git a/Source/SvgElement.cs b/Source/SvgElement.cs index 8142b1bcc39c30789e716c7d95e0d03b67f15fe4..d99c3a0709c1accab814454053eefda25806c969 100644 --- a/Source/SvgElement.cs +++ b/Source/SvgElement.cs @@ -31,9 +31,8 @@ namespace Svg } //reflection cache - protected IEnumerable _svgPropertyAttributes; - protected IEnumerable _svgEventAttributes; - + private IEnumerable _svgPropertyAttributes; + private IEnumerable _svgEventAttributes; internal SvgElement _parent; private string _elementName; diff --git a/Source/Text/SvgText.cs b/Source/Text/SvgText.cs index c159e9957d7280603436daa23645c839169df711..4e71132d96818f862f139ac9d3b866dec8d19886 100644 --- a/Source/Text/SvgText.cs +++ b/Source/Text/SvgText.cs @@ -275,6 +275,10 @@ namespace Svg } return _path; } + protected set + { + _path = value; + } } private static string ValidateFontFamily(string fontFamilyList) diff --git a/Source/Transforms/SvgTransformCollection.cs b/Source/Transforms/SvgTransformCollection.cs index bfe1fa8117742a22f9f23405b05769fdf5878cb2..a7164b18949923052fc4c325c1cb644a8b37c536 100644 --- a/Source/Transforms/SvgTransformCollection.cs +++ b/Source/Transforms/SvgTransformCollection.cs @@ -63,7 +63,12 @@ namespace Svg.Transforms return true; return base.Equals(obj); } - + + public override int GetHashCode() + { + return base.GetHashCode(); + } + public new SvgTransform this[int i] { get { return base[i]; }