Add wxDCImpl::MSWApplyGDIPlusTransform() to formalize wxRendererMSW hack.

Replace the dynamic_cast<> used in wxMSW wxRenderer implementation code with a
virtual function call.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-07 13:05:22 +00:00
parent 6c0e710f00
commit 53d4bdbc15
4 changed files with 52 additions and 28 deletions

View File

@@ -1156,4 +1156,21 @@ void wxGCDCImpl::DoDrawCheckMark(wxCoord x, wxCoord y,
wxDCImpl::DoDrawCheckMark(x,y,width,height);
}
#ifdef __WXMSW__
wxRect wxGCDCImpl::MSWApplyGDIPlusTransform(const wxRect& r) const
{
wxGraphicsContext* const gc = GetGraphicsContext();
wxCHECK_MSG( gc, r, wxT("Invalid wxGCDC") );
double x = 0,
y = 0;
gc->GetTransform().TransformPoint(&x, &y);
wxRect rect(r);
rect.Offset(x, y);
return rect;
}
#endif // __WXMSW__
#endif // wxUSE_GRAPHICS_CONTEXT