SVGFileDC pen and brush support

When drawing to SVGFileDC, I see 2 errors regarding pen and brush styles:

DrawLine() produces an error, when pen styles are either wx.DOT, wx.DOT_DASH or wx.SHORT_DASH, but wx.SOLID works fine.

Here’s the error:

wx._core.wxAssertionError: C++ assertion “false” failed at …\src\common\dcsvg.cpp(84) in `anonymous-namespace’::wxPenString(): wxSVGFileDC::Requested Pen Style not available

DrawRectangle() produces an error, when brush styles are either wx.CROSSDIAG_HATCH, wx.BDIAGONAL_HATCH or wx.FDIAGONAL_HATCH, but wx.SOLID works fine.

Here’s the error:

wx._core.wxAssertionError: C++ assertion “false” failed at …\src\common\dcsvg.cpp(104) in `anonymous-namespace’::wxBrushString(): wxSVGFileDC::Requested Brush Style not available

Enclosed a script demonstrating these issues.

svg_pen_brush.py (1.95 KB)

Release 4.0.6 seems to have resolved these issues, except for brush style BDIAGONAL_HATCH.

Looking at wxWidgets code

https://github.com/wxWidgets/wxWidgets/pull/1275/commits/b826427062939d899b72488f6e80deb0842ddea5

it seems like the following brush styles are not supported:

BRUSHSTYLE_STIPPLE_MASK_OPAQUE

BRUSHSTYLE_STIPPLE_MASK
BRUSHSTYLE_STIPPLE
BRUSHSTYLE_BDIAGONAL_HATCH