Post #902186
2026-04-01 04:33 UTC
Unless I'm incorrect on this, and I could very well be, I think that the wxDC API really just uses wxGraphicsContext under the hood in #wxWidgets on Linux w/ GTK 3 under Wayland. Not sure if it's the same for GTK under X11, but I know it's that way for macOS. This is for wxWidgets 3.2.10.
The only different where it'll actually matter likely is on #Windows I assume, where wxDC uses GDI and wxGraphicsContext can use either GDI+ (default) or Direct2D.
Replies (1)
-
@gperson@social.linux.pizza 2026-04-01 04:37
I derive my above conclusion with wxDC under GTK 3 Wayland because wxDC::GetGraphicsContext() returns a non-null DC when using a wxPaintDC. Consider this following code executed inside a paint handler: wxPaintDC dc(this); wxASSERT(dc.GetGraphicsContext()); When executed, no assertion is tripped if running with GTK 3 under Wayland with wxWidgets 3.2.10.