How to work to draw in wxpython?

Hi!
In wxpython there are four classes that are related on drawing , wx.DC、wx.GCDC、 wx.GraphicsRenderer、 wx.GraphicsContext。I don’t understand the difference among them.
What are the nuances between them?

Hi angkw567,

The best answer is, Whats the difference between DC, GC and GCDC - #2 by Robin

See also wxdemo://Miscellaneous/GraphicsContext, where the overview says,

The wx.GCDC class is a class that implemented the wx.DC API using the
new wx.GraphicsContext class, and so it supports anti-aliased drawing
using pens and brushes, that can optionally also be drawn using an
alpha transparency. (On the Mac all the DC classes are using this new
implementation.) This is accomplished by enabling the wx.Colour class
to have a fourth component for the alpha value, where 0 is fully
transparent, and 255 is fully opaque.

Pragmatically, the only thing I understand is that if I want to draw transparent something, use GCDC. :slight_smile: (I’m using Windows 10)

Hi , komoto48g!
Thanks very much! I got it !