Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes empty path issue #1131

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Source/Paths/SvgClosePathSegment.Drawing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public override PointF AddToPath(GraphicsPath graphicsPath, PointF start, SvgPat
graphicsPath.CloseFigure();

var end = start;
// Check for empty path, as graphicsPath.PathTypes will throw exception: ArgumentException
if (graphicsPath.PointCount == 0)
return end;

var pathTypes = graphicsPath.PathTypes;
for (var i = graphicsPath.PointCount - 1; i >= 0; --i)
if ((pathTypes[i] & 0x7) == 0)
Expand Down
4 changes: 4 additions & 0 deletions doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ The release versions are NuGet releases.

### Changes
* added SvgOptions with css parameter to Open so that this can be used for transforming the svgdocument.
* Split tests SVG/PNG files into Issues and W3C Test Suite. W3C Test Suite files are not automatically downloaded.
* Repository clean-up, reducing the download zip size from 22MB to 4.5MB.

### Enhancements
* made exceptions serializable to be able to cross AppDomain boundaries (see [#826](https://github.com/svg-net/SVG/pull/826))

### Fixes
* fixed XML namespace prefixes are also applied for nodes declaring them (see [PR #1106](https://github.com/svg-net/SVG/pull/1106))
* fixed Parameter is not valid (see [PR #1131](https://github.com/svg-net/SVG/pull/1131))

## [Version 3.4.6](https://www.nuget.org/packages/Svg/3.4.6) (2023-11-16)

Expand Down
Loading