Simplify wxGraphicsContext code by using wxDC::GetHDC()

No real changes, just use GetHDC() instead of reproducing what it does.
This commit is contained in:
Vadim Zeitlin
2022-06-04 17:37:45 +01:00
parent 73d425b342
commit c66cd985dd

View File

@@ -1862,8 +1862,7 @@ wxGDIPlusContext::wxGDIPlusContext( wxGraphicsRenderer* renderer, HDC hdc, wxDou
wxGDIPlusContext::wxGDIPlusContext( wxGraphicsRenderer* renderer, const wxDC& dc )
: wxGraphicsContext(renderer, dc.GetWindow())
{
wxMSWDCImpl *msw = wxDynamicCast( dc.GetImpl() , wxMSWDCImpl );
HDC hdc = (HDC) msw->GetHDC();
HDC hdc = (HDC) dc.GetHDC();
wxSize sz = dc.GetSize();
Init(new Graphics(hdc), sz.x, sz.y);