SVGFileDC pen and brush support

5 views
Skip to first unread message

ABC

unread,
Mar 16, 2019, 5:35:54 PM3/16/19
to wxPython-dev
When drawing to SVGFileDC, I see 2 errors regarding pen and brush styles:
1.
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

2.
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

ABC

unread,
May 24, 2019, 5:10:59 PM5/24/19
to wxPython-dev
Release 4.0.6 seems to have resolved these issues, except for brush style BDIAGONAL_HATCH.

Looking at wxWidgets code
it seems like the following brush styles are not supported:
BRUSHSTYLE_STIPPLE_MASK_OPAQUE
BRUSHSTYLE_STIPPLE_MASK
BRUSHSTYLE_STIPPLE
BRUSHSTYLE_BDIAGONAL_HATCH



Reply all
Reply to author
Forward
0 new messages