X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..0d58bb65789a8efec581d2beb2117669d1d1db9d:/src/gtk/dcclient.cpp diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 0d0376f8e0..f318b34c92 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1090,7 +1090,8 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxDC *source, wxCoord xsrc, wxCoord ysrc, int logical_func, - bool useMask ) + bool useMask, + wxCoord xsrcMask, wxCoord ysrcMask ) { /* this is the nth try to get this utterly useless function to work. it now completely ignores the scaling or translation @@ -1115,6 +1116,12 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, bool use_bitmap_method = FALSE; bool is_mono = FALSE; + /* TODO: use the mask origin when drawing transparently */ + if (xsrcMask == -1 && ysrcMask == -1) + { + xsrcMask = xsrc; ysrcMask = ysrc; + } + if (srcDC->m_isMemDC) { if (!memDC->m_selected.Ok()) return FALSE; @@ -2102,6 +2109,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC) wxClientDC::wxClientDC( wxWindow *win ) : wxWindowDC( win ) { + wxCHECK_RET( win, _T("NULL window in wxClientDC::wxClientDC") ); + #ifdef __WXUNIVERSAL__ wxPoint ptOrigin = win->GetClientAreaOrigin(); SetDeviceOrigin(ptOrigin.x, ptOrigin.y); @@ -2110,6 +2119,13 @@ wxClientDC::wxClientDC( wxWindow *win ) #endif // __WXUNIVERSAL__ } +void wxClientDC::DoGetSize(int *width, int *height) const +{ + wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") ); + + m_owner->GetClientSize( width, height ); +} + // ---------------------------------------------------------------------------- // wxDCModule // ----------------------------------------------------------------------------