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:
@@ -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
|
||||
|
Reference in New Issue
Block a user