]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dcclient.cpp
renamed wxDynamicThisCast to wxDynamicCastThis, removed 1st parameter, and documented
[wxWidgets.git] / src / gtk / dcclient.cpp
index 0d0376f8e02e8ba9930318f5ec959bfc8406a15e..f318b34c92a5279e43c30c4dc0ac570b1687b203 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------