]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
set anti-aliasing ON by default
[wxWidgets.git] / src / msw / dc.cpp
index ca841ef82304c5e0c0f9dcf91f321c96f00f81d2..03375ff1083a7e81509d36956401417ffd14df68 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #ifndef WX_PRECOMP
+    #include "wx/msw/wrapcdlg.h"
     #include "wx/image.h"
     #include "wx/window.h"
     #include "wx/dc.h"
     #include "wx/dcmemory.h"
     #include "wx/log.h"
     #include "wx/icon.h"
+    #include "wx/dcprint.h"
+    #include "wx/module.h"
 #endif
 
 #include "wx/sysopt.h"
-#include "wx/dcprint.h"
-#include "wx/module.h"
 #include "wx/dynlib.h"
 
 #ifdef wxHAVE_RAW_BITMAP
@@ -48,7 +49,6 @@
 
 #include <string.h>
 
-#include "wx/msw/wrapcdlg.h"
 #ifndef __WIN32__
     #include <print.h>
 #endif
@@ -554,9 +554,9 @@ void wxDC::Clear()
         if (!m_selectedBitmap.Ok())
             return;
 
-        rect.left = 0; rect.top = 0;
-        rect.right = m_selectedBitmap.GetWidth();
-        rect.bottom = m_selectedBitmap.GetHeight();
+        rect.left = -m_deviceOriginX; rect.top = -m_deviceOriginY;
+        rect.right = m_selectedBitmap.GetWidth()-m_deviceOriginX;
+        rect.bottom = m_selectedBitmap.GetHeight()-m_deviceOriginY;
     }
 
 #ifndef __WXWINCE__
@@ -1488,7 +1488,7 @@ void wxDC::SetFont(const wxFont& font)
         else // selected ok
         {
             if ( !m_oldFont )
-                m_oldFont = (WXHPEN)hfont;
+                m_oldFont = (WXHFONT)hfont;
 
             m_font = font;
         }
@@ -1581,7 +1581,7 @@ void wxDC::SetBrush(const wxBrush& brush)
         else // selected ok
         {
             if ( !m_oldBrush )
-                m_oldBrush = (WXHPEN)hbrush;
+                m_oldBrush = (WXHBRUSH)hbrush;
 
             m_brush = brush;
         }
@@ -1807,8 +1807,8 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
     {
         // Win9x and WinNT+ have different limits
         int version = wxGetOsVersion();
-        maxLenText = version == wxWINDOWS_NT ? 65535 : 8192;
-        maxWidth =   version == wxWINDOWS_NT ? INT_MAX : 32767;
+        maxLenText = version == wxOS_WINDOWS_NT ? 65535 : 8192;
+        maxWidth =   version == wxOS_WINDOWS_NT ? INT_MAX : 32767;
     }
 
     widths.Empty();
@@ -2258,7 +2258,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
                                      ds.dsBm.bmBits,
                                      (LPBITMAPINFO)&ds.dsBmih,
                                      DIB_RGB_COLORS,
-                                     SRCCOPY
+                                     dwRop
                                      ) == (int)GDI_ERROR )
                 {
                     // On Win9x this API fails most (all?) of the time, so