Commit 69532c40 authored by Eric Domke's avatar Eric Domke
Browse files

Attempting to fix merge conflicts

parents 7a093b52 ba8a9744
...@@ -15,16 +15,17 @@ namespace Svg ...@@ -15,16 +15,17 @@ namespace Svg
} }
public override SvgElement DeepCopy() public override SvgElement DeepCopy()
{ {
return DeepCopy<SvgDescription>(); return DeepCopy<SvgDescription>();
} }
public override SvgElement DeepCopy<T>() public override SvgElement DeepCopy<T>()
{ {
var newObj = base.DeepCopy<T>() as SvgDescription; var newObj = base.DeepCopy<T>() as SvgDescription;
return newObj; newObj.Text = this.Text;
} return newObj;
}
} }
} }
\ No newline at end of file
...@@ -13,16 +13,16 @@ namespace Svg ...@@ -13,16 +13,16 @@ namespace Svg
return this.Content; return this.Content;
} }
public override SvgElement DeepCopy() public override SvgElement DeepCopy()
{ {
return DeepCopy<SvgTitle>(); return DeepCopy<SvgTitle>();
} }
public override SvgElement DeepCopy<T>() public override SvgElement DeepCopy<T>()
{ {
var newObj = base.DeepCopy<T>() as SvgTitle; var newObj = base.DeepCopy<T>() as SvgTitle;
return newObj; return newObj;
} }
} }
} }
\ No newline at end of file
...@@ -57,9 +57,9 @@ namespace Svg ...@@ -57,9 +57,9 @@ namespace Svg
{ {
alphastring = "0" + alphastring; alphastring = "0" + alphastring;
} }
var alphaDecimal = decimal.Parse(alphastring); var alphaDecimal = decimal.Parse(alphastring);
if(alphaDecimal <= 1) if(alphaDecimal <= 1)
{ {
alphaValue = (int)(alphaDecimal * 255); alphaValue = (int)(alphaDecimal * 255);
......
...@@ -116,4 +116,4 @@ namespace Svg ...@@ -116,4 +116,4 @@ namespace Svg
return base.ConvertTo(context, culture, value, destinationType); return base.ConvertTo(context, culture, value, destinationType);
} }
} }
} }
\ No newline at end of file
...@@ -8,7 +8,7 @@ namespace Svg.Pathing ...@@ -8,7 +8,7 @@ namespace Svg.Pathing
{ {
public override void AddToPath(System.Drawing.Drawing2D.GraphicsPath graphicsPath) public override void AddToPath(System.Drawing.Drawing2D.GraphicsPath graphicsPath)
{ {
// Important for custom line caps. Force the path the close with an explicit line, not just an implicit close of the figure. // Important for custom line caps. Force the path the close with an explicit line, not just an implicit close of the figure.
if (graphicsPath.PointCount > 0 && !graphicsPath.PathPoints[0].Equals(graphicsPath.PathPoints[graphicsPath.PathPoints.Length - 1])) if (graphicsPath.PointCount > 0 && !graphicsPath.PathPoints[0].Equals(graphicsPath.PathPoints[graphicsPath.PathPoints.Length - 1]))
{ {
...@@ -26,4 +26,4 @@ namespace Svg.Pathing ...@@ -26,4 +26,4 @@ namespace Svg.Pathing
} }
} }
} }
\ No newline at end of file
...@@ -222,9 +222,9 @@ namespace Svg ...@@ -222,9 +222,9 @@ namespace Svg
{ {
var lastSegment = segments.Last; var lastSegment = segments.Last;
// if the last element is a SvgClosePathSegment the position of the previous move to should be used because the position of SvgClosePathSegment is 0,0 // if the last element is a SvgClosePathSegment the position of the previous element should be used because the position of SvgClosePathSegment is 0,0
if (lastSegment is SvgClosePathSegment) if (lastSegment is SvgClosePathSegment)
lastSegment = segments.OfType<SvgMoveToSegment>().Last(); lastSegment = segments[segments.Count - 2];
if (isRelativeX) if (isRelativeX)
{ {
...@@ -290,7 +290,6 @@ namespace Svg ...@@ -290,7 +290,6 @@ namespace Svg
{ {
if (value is string) if (value is string)
{ {
if (string.IsNullOrEmpty((string)value)) return new SvgPathSegmentList();
return Parse((string)value); return Parse((string)value);
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<OldToolsVersion>3.5</OldToolsVersion> <OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<SccProjectName> <SccProjectName>
</SccProjectName> </SccProjectName>
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
<Compile Include="Extensions.cs" /> <Compile Include="Extensions.cs" />
<Compile Include="Painting\ISvgBoundable.cs" /> <Compile Include="Painting\ISvgBoundable.cs" />
<Compile Include="Painting\SvgDeferredPaintServer.cs" /> <Compile Include="Painting\SvgDeferredPaintServer.cs" />
<Compile Include="Painting\ISvgBoundable.cs" />
<Compile Include="Painting\SvgMarker.cs" /> <Compile Include="Painting\SvgMarker.cs" />
<Compile Include="Document Structure\SvgDefinitionList.cs" /> <Compile Include="Document Structure\SvgDefinitionList.cs" />
<Compile Include="Document Structure\SvgDescription.cs" /> <Compile Include="Document Structure\SvgDescription.cs" />
......
...@@ -401,4 +401,4 @@ namespace Svg ...@@ -401,4 +401,4 @@ namespace Svg
} }
} }
} }
} }
\ No newline at end of file
...@@ -527,7 +527,7 @@ namespace Svg ...@@ -527,7 +527,7 @@ namespace Svg
foreach (var attr in _svgEventAttributes) foreach (var attr in _svgEventAttributes)
{ {
var evt = attr.Event.GetValue(this); var evt = attr.Event.GetValue(this);
//if someone has registered publish the attribute //if someone has registered publish the attribute
if (evt != null && !string.IsNullOrEmpty(this.ID)) if (evt != null && !string.IsNullOrEmpty(this.ID))
{ {
...@@ -711,7 +711,7 @@ namespace Svg ...@@ -711,7 +711,7 @@ namespace Svg
newObj.ID = this.ID; newObj.ID = this.ID;
newObj.Content = this.Content; newObj.Content = this.Content;
newObj.ElementName = this.ElementName; newObj.ElementName = this.ElementName;
// if (this.Parent != null) // if (this.Parent != null)
// this.Parent.Children.Add(newObj); // this.Parent.Children.Add(newObj);
...@@ -724,11 +724,11 @@ namespace Svg ...@@ -724,11 +724,11 @@ namespace Svg
{ {
newObj.Children.Add(child.DeepCopy()); newObj.Children.Add(child.DeepCopy());
} }
foreach (var attr in this._svgEventAttributes) foreach (var attr in this._svgEventAttributes)
{ {
var evt = attr.Event.GetValue(this); var evt = attr.Event.GetValue(this);
//if someone has registered also register here //if someone has registered also register here
if (evt != null) if (evt != null)
{ {
...@@ -750,7 +750,7 @@ namespace Svg ...@@ -750,7 +750,7 @@ namespace Svg
(newObj as SvgText).Change += delegate { }; (newObj as SvgText).Change += delegate { };
} }
} }
if(this._customAttributes.Count > 0) if(this._customAttributes.Count > 0)
{ {
foreach (var element in _customAttributes) foreach (var element in _customAttributes)
...@@ -758,15 +758,15 @@ namespace Svg ...@@ -758,15 +758,15 @@ namespace Svg
newObj.CustomAttributes.Add(element.Key, element.Value); newObj.CustomAttributes.Add(element.Key, element.Value);
} }
} }
return newObj; return newObj;
} }
/// <summary> /// <summary>
/// Fired when an Atrribute of this Element has changed /// Fired when an Atrribute of this Element has changed
/// </summary> /// </summary>
public event EventHandler<AttributeEventArgs> AttributeChanged; public event EventHandler<AttributeEventArgs> AttributeChanged;
protected void OnAttributeChanged(AttributeEventArgs args) protected void OnAttributeChanged(AttributeEventArgs args)
{ {
var handler = AttributeChanged; var handler = AttributeChanged;
...@@ -775,12 +775,12 @@ namespace Svg ...@@ -775,12 +775,12 @@ namespace Svg
handler(this, args); handler(this, args);
} }
} }
/// <summary> /// <summary>
/// Fired when an Atrribute of this Element has changed /// Fired when an Atrribute of this Element has changed
/// </summary> /// </summary>
public event EventHandler<ContentEventArgs> ContentChanged; public event EventHandler<ContentEventArgs> ContentChanged;
protected void OnContentChanged(ContentEventArgs args) protected void OnContentChanged(ContentEventArgs args)
{ {
var handler = ContentChanged; var handler = ContentChanged;
......
...@@ -48,4 +48,4 @@ namespace Svg ...@@ -48,4 +48,4 @@ namespace Svg
return newObj; return newObj;
} }
} }
} }
\ No newline at end of file
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