Are there any different between wx.GraphicsContext and wx.DC?

wx.GraphicsContext and wx.DC can both draw on the window,and these
two can carry out the same tasks. Are there any different in them?

In the wxPython demo, the overview for wx.GraphicsContext and wx.GraphicsPath says:

The new advanced 2D drawing API is implemented via the wx.GraphicsContext and wx.GraphicsPath classes. They wrap GDI+ on Windows, Cairo on wxGTK and CoreGraphics on OS X. They allow path-based drawing with alpha-blending and anti-aliasing, and use a floating point coordinate system.
When viewing this sample pay attention to how the rounded edges are smoothed with anti-aliased drawing, and how the shapes on the lower half of the window are partially transparent, allowing you to see what was drawn before.

I made use of wx.GraphicsContext in an IconEditor app in order to use anti-aliased drawing:

Screenshot at 2022-04-29 08-24-08

dive into (method OnPaint, where else, and good luck) :innocent:

That means the wx.GraphicsContext is more functions than wx.DC,and is based on the wx.DC,and is an branch of wx.DC. So when using wx.GraphicsContext,fisrt wx.DC is created,then pass the instance of wx.DC as a param to the wx.GraphicsContext.