Transparent brush

Recently switched from wxPython 3.xx to 4.1. Bitmaps with brush style=wx.TRANSPARENT
are no longer transparent but are black and cover underlying fields.
Changing the style to wx.TRANSPARENT_BRUSH turns the plotting field white but still hides underlying fields. How do I properly create transparent bitmaps using
wx.BufferedDC(None, wx.Bitmap(self.xSize, self.ySize))? I am running wxPython on macOS X.
Thanks.

Transparent brushes do not turn the pixels transparent, it simply means that things like DrawRect will not change the pixels that would normally be painted by the brush. IOW, it leaves those pixels untouched.

One way to get transparent pixels in a memory or buffered dc is to create a bitmap full of transparent pixels. Here is an example of doing that.

Thanks Robin. Great help.