Skip to content

Commit

Permalink
Make sure that SvgPath takes transforms into account (#915)
Browse files Browse the repository at this point in the history
* Add test.
* Fixes #830 'Bounds for SvgPath don't take transforms into account' issue
* Update ReleaseNotes.md.
  • Loading branch information
H1Gdev committed Oct 17, 2021
1 parent e42d4ff commit f778899
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
12 changes: 1 addition & 11 deletions Source/Paths/SvgPath.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Drawing2D;
using Svg.Pathing;

namespace Svg
Expand Down Expand Up @@ -90,15 +89,6 @@ public void OnPathUpdated()
OnAttributeChanged(new AttributeEventArgs { Attribute = "d", Value = Attributes.GetAttribute<SvgPathSegmentList>("d") });
}

/// <summary>
/// Gets the bounds of the element.
/// </summary>
/// <value>The bounds.</value>
public override RectangleF Bounds
{
get { return Path(null).GetBounds(); }
}

public override SvgElement DeepCopy()
{
return DeepCopy<SvgPath>();
Expand Down
1 change: 1 addition & 0 deletions Tests/Svg.UnitTests/PassingTests.csv
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ __issue-755-01
__issue-758-01
__issue-769-01
__issue-785-01
__issue-830-01
__issue-863-01
__issue-886-01
__issue-888-01
Expand Down
1 change: 1 addition & 0 deletions Tests/W3CTestSuite/PassingTests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ __issue-755-01.svg
__issue-758-01.svg
__issue-769-01.svg
__issue-785-01.svg
__issue-830-01.svg
__issue-863-01.svg
__issue-886-01.svg
__issue-888-01.svg
Expand Down
Binary file added Tests/W3CTestSuite/png/__issue-830-01.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Tests/W3CTestSuite/svg/__issue-830-01.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The release versions are NuGet releases.

### Fixes
* fixed color blend position (see [#902](https://github.com/svg-net/SVG/issues/902))
* remove override method that is no longer needed in `SvgPath` (see [#830](https://github.com/svg-net/SVG/issues/830))

## [Version 3.3.0](https://www.nuget.org/packages/Svg/3.3.0) (2021-09-23)

Expand Down

0 comments on commit f778899

Please sign in to comment.