Commit ae14773f authored by Tebjan Halm's avatar Tebjan Halm
Browse files

Merge remote-tracking branch 'origin/master' into textEvents

parents 8323a365 54f84bf1
......@@ -96,6 +96,10 @@ namespace Svg
}
return _path;
}
protected set
{
_path = value;
}
}
/// <summary>
......
......@@ -95,6 +95,10 @@ namespace Svg
}
return _path;
}
protected set
{
_path = value;
}
}
/// <summary>
......
......@@ -84,6 +84,9 @@ namespace Svg
{
return null;
}
protected set
{
}
}
/// <summary>
......
......@@ -75,6 +75,10 @@ namespace Svg
}
return this._path;
}
protected set
{
_path = value;
}
}
public override System.Drawing.RectangleF Bounds
......
......@@ -14,8 +14,8 @@ namespace Svg
[SvgElement("polygon")]
public class SvgPolygon : SvgVisualElement
{
protected GraphicsPath _path;
protected SvgUnitCollection _points;
private GraphicsPath _path;
private SvgUnitCollection _points;
/// <summary>
/// The points that make up the SvgPolygon
......@@ -68,6 +68,10 @@ namespace Svg
}
return this._path;
}
protected set
{
_path = value;
}
}
public override RectangleF Bounds
......
......@@ -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;
}
}
}
......
......@@ -247,6 +247,10 @@ namespace Svg
}
return _path;
}
protected set
{
_path = value;
}
}
/// <summary>
......
......@@ -22,7 +22,7 @@ namespace Svg
/// <summary>
/// Gets the <see cref="GraphicsPath"/> for this element.
/// </summary>
public abstract GraphicsPath Path { get; }
public abstract GraphicsPath Path { get; protected set; }
/// <summary>
/// Gets the bounds of the element.
/// </summary>
......
......@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text;
namespace Svg.DataTypes
{
......
......@@ -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)
{
......
......@@ -27,12 +27,13 @@ namespace Svg
{
get
{
var path = new GraphicsPath();
//var path = new GraphicsPath();
//AddPaths(this, path);
return GetPaths(this);
}
protected set
{ }
}
/// <summary>
......
......@@ -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
......
......@@ -70,6 +70,10 @@ namespace Svg
return (path as SvgPath).Path;
return null;
}
protected set
{
// No-op
}
}
public override System.Drawing.RectangleF Bounds
......
......@@ -89,6 +89,10 @@ namespace Svg
}
return _path;
}
protected set
{
_path = value;
}
}
internal void OnPathUpdated()
......
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)]
......@@ -54,7 +54,9 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DebugSymbols>true</DebugSymbols>
<DocumentationFile>..\..\vvvv\public\common\src\thirdparty\Svg.XML</DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>PdbOnly</DebugType>
......
......@@ -108,7 +108,7 @@ namespace Svg
/// </summary>
public event EventHandler<AttributeEventArgs> 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
/// </summary>
public event EventHandler<AttributeEventArgs> AttributeChanged;
protected void OnAttributeChanged(string attribute, object value)
private void OnAttributeChanged(string attribute, object value)
{
var handler = AttributeChanged;
if(handler != null)
......
......@@ -16,7 +16,7 @@ namespace Svg
/// </summary>
public class SvgDocument : SvgFragment, ITypeDescriptorContext
{
public static readonly int PPI = 96;
public static readonly int PointsPerInch = 96;
private SvgElementIdManager _idManager;
......
......@@ -31,9 +31,8 @@ namespace Svg
}
//reflection cache
protected IEnumerable<PropertyAttributeTuple> _svgPropertyAttributes;
protected IEnumerable<EventAttributeTuple> _svgEventAttributes;
private IEnumerable<PropertyAttributeTuple> _svgPropertyAttributes;
private IEnumerable<EventAttributeTuple> _svgEventAttributes;
internal SvgElement _parent;
private string _elementName;
......
......@@ -275,6 +275,10 @@ namespace Svg
}
return _path;
}
protected set
{
_path = value;
}
}
private static string ValidateFontFamily(string fontFamilyList)
......
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