Various small fixes to wxSVGFileDC (PR #26362)

21 views
Skip to first unread message

Blake-Madden

unread,
Apr 7, 2026, 5:06:58 PM (3 days ago) Apr 7
to wx-...@googlegroups.com, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26362

Commit Summary

  • 341b52b Guard against negative pen widths
  • b587e33 Fix incorrect size passed to substringing
  • 19dd909 Clip rect should use no stroke, not gray

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26362@github.com>

VZ

unread,
Apr 7, 2026, 6:40:15 PM (2 days ago) Apr 7
to wx-...@googlegroups.com, Subscribed

@vadz commented on this pull request.

Thanks, the other commits look good but I'd rather not apply the first one.


In src/common/dcsvg.cpp:

> @@ -204,7 +204,7 @@ wxString GetPenStyle(const wxPen& pen)
 {
     wxString penStyle;
 
-    penStyle += wxString::Format(wxS("stroke-width=\"%d\""), pen.GetWidth());
+    penStyle += wxString::Format(wxS("stroke-width=\"%d\""), wxMax(0, pen.GetWidth()));

Sorry, I don't think this is the right place to do this. Negative pen widths are not allowed, we need to detect this in wxPen::SetWidth() and assert there, not allow silently using them as invisible pens.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26362/review/4071721816@github.com>

Blake-Madden

unread,
Apr 7, 2026, 6:48:15 PM (2 days ago) Apr 7
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26362/before/19dd90979ddb81d5ba5599723a2006ffac343aef/after/88fe94fb4cd28a70c614dfcb9fab72f7c54b1b40@github.com>

Blake-Madden

unread,
Apr 7, 2026, 6:48:43 PM (2 days ago) Apr 7
to wx-...@googlegroups.com, Subscribed

@Blake-Madden commented on this pull request.


In src/common/dcsvg.cpp:

> @@ -204,7 +204,7 @@ wxString GetPenStyle(const wxPen& pen)
 {
     wxString penStyle;
 
-    penStyle += wxString::Format(wxS("stroke-width=\"%d\""), pen.GetWidth());
+    penStyle += wxString::Format(wxS("stroke-width=\"%d\""), wxMax(0, pen.GetWidth()));

OK, just rolled that one back.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26362/review/4071755152@github.com>

Blake-Madden

unread,
Apr 8, 2026, 4:40:36 PM (2 days ago) Apr 8
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.

  • e40a1c6 Fix swapped clip ID and nesting level variables in SVG DC


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26362/before/88fe94fb4cd28a70c614dfcb9fab72f7c54b1b40/after/e40a1c6a7aef5212c5cf5492dc87dce9443529ec@github.com>

VZ

unread,
Apr 8, 2026, 9:05:22 PM (2 days ago) Apr 8
to wx-...@googlegroups.com, Subscribed

Closed #26362 via 0d55883.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26362/issue_event/24317936793@github.com>

Reply all
Reply to author
Forward
0 new messages