git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43192
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
m_window = dc->GetWindow();
m_rect = wxRect(x, y, width, height);
m_window = dc->GetWindow();
m_rect = wxRect(x, y, width, height);
- m_rect.Offset(m_window->GetClientAreaOrigin());
+ if ( wxDynamicCast(dc, wxClientDC) )
+ m_rect.Offset(m_window->GetClientAreaOrigin());
// FIXME: create surface with transparency or key color (?)
m_surface =
// FIXME: create surface with transparency or key color (?)
m_surface =
void wxOverlayImpl::BeginDrawing(wxWindowDC *dc)
{
void wxOverlayImpl::BeginDrawing(wxWindowDC *dc)
{
- wxPoint origin(m_rect.GetPosition() - m_window->GetClientAreaOrigin());
+ wxPoint origin(m_rect.GetPosition());
+ if ( wxDynamicCast(dc, wxClientDC) )
+ origin -= m_window->GetClientAreaOrigin();
// drawing on overlay "hijacks" existing wxWindowDC rather then using
// another DC, so we have to change the DC to draw on the overlay's surface.
// drawing on overlay "hijacks" existing wxWindowDC rather then using
// another DC, so we have to change the DC to draw on the overlay's surface.