jwdj / EasyABC

EasyABC
GNU General Public License v2.0
90 stars 36 forks source link

Fixup svg_stroke=='none' under MacOS and wxPython >= 4.1 #30

Closed jw35 closed 3 years ago

jw35 commented 3 years ago

svgrender uses a pen defined by

self.renderer.CreatePen(wx.GraphicsPenInfo())

for strokes with svg_stroke=='none' when using wxPython >= 4.1. At least under MacOS this results in an exception

wx._core.wxAssertionError: C++ assertion "retval != __null" failed at /Users/robind/projects/bb2/dist-osx-py38/build/ext/wxWidgets/src/osx/carbon/graphics.cpp(116) in wxMacCreateCGColor():

This commit adds style=wx.PENSTYLE_TRANSPARENT to the pen definition which seems to resolve the problem while still resulting in correct output.