Commit 68a7def5 authored by Tebjan Halm's avatar Tebjan Halm
Browse files

Merge branch 'master' of github.com:vvvv/SVG

parents 457a82fe a31f24c1
SVG.NET
=======
Public fork of the C# SVG rendering library on codeplex:
https://svg.codeplex.com/
This started out as a minor modification to enable the writing of proper SVG strings. But now after almost two years we have so many fixes and improvements that we decided to share our current codebase to the public in order to improve it even further.
So please feel free to fork it and open pull requests for any fix, improvement or feature you add.
Microsoft Public License:
https://svg.codeplex.com/license
It is also available via Nuget:
PM> Install-Package Svg
......@@ -166,11 +166,28 @@ namespace Svg
private static PointF Reflect(PointF point, PointF mirror)
{
// TODO: Only works left to right???
var x = mirror.X + (mirror.X - point.X);
var y = mirror.Y + (mirror.Y - point.Y);
float x, y, dx, dy;
dx = Math.Abs(mirror.X - point.X);
dy = Math.Abs(mirror.Y - point.Y);
return new PointF(Math.Abs(x), Math.Abs(y));
if (mirror.X >= point.X)
{
x = mirror.X + dx;
}
else
{
x = mirror.X - dx;
}
if (mirror.Y >= point.Y)
{
y = mirror.Y + dy;
}
else
{
y = mirror.Y - dy;
}
return new PointF(x, y);
}
/// <summary>
......
......@@ -161,7 +161,7 @@ namespace Svg
foreach (SvgTransform transformation in this.Transforms)
{
transformMatrix.Multiply(transformation.Matrix);
transformMatrix.Multiply(transformation.Matrix, MatrixOrder.Append);
}
renderer.Transform = transformMatrix;
......
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