]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
WXDLLEXPORTLOCAL removed, WXDLLEXPORT seems to be enough
[wxWidgets.git] / src / msw / dc.cpp
index ad8039c3263af9f2e82b86b714142ea8eddcb545..a7b088cb0e630c4f42b12766eea485f893e8104c 100644 (file)
 #endif
 
 #ifndef WX_PRECOMP
-    #include "wx/frame.h"
+    #include "wx/window.h"
     #include "wx/dc.h"
     #include "wx/utils.h"
     #include "wx/dialog.h"
     #include "wx/app.h"
     #include "wx/bitmap.h"
     #include "wx/dcmemory.h"
+    #include "wx/log.h"
+    #include "wx/icon.h"
 #endif
 
 #include "wx/dcprint.h"
-#include "wx/msw/private.h"
 
 #include <string.h>
 #include <math.h>
@@ -52,6 +53,8 @@
     #include <print.h>
 #endif
 
+#include "wx/msw/private.h"
+
 #if !USE_SHARED_LIBRARY
     IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
 #endif
@@ -556,7 +559,7 @@ void wxDC::DoDrawRoundedRectangle(long x, long y, long width, long height, doubl
     long y2 = (y+height);
 
     (void)RoundRect(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2),
-        YLOG2DEV(y2), 2*XLOG2DEV(radius), 2*YLOG2DEV(radius));
+        YLOG2DEV(y2), (int) (2*XLOG2DEV(radius)), (int)( 2*YLOG2DEV(radius)));
 
     CalcBoundingBox(x, y);
     CalcBoundingBox(x2, y2);
@@ -637,7 +640,6 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask )
         HBITMAP hbitmap = (HBITMAP) bmp.GetHBITMAP( );
         ::SelectObject( memdc, hbitmap );
         ::BitBlt( cdc, x, y, bmp.GetWidth(), bmp.GetHeight(), memdc, 0, 0, SRCCOPY);
-        ::SelectObject( memdc, 0 );
         ::DeleteDC( memdc );
     }
     else
@@ -1103,22 +1105,22 @@ long wxDCBase::DeviceToLogicalYRel(long y) const
 
 long wxDCBase::LogicalToDeviceX(long x) const
 {
-    return (long) (floor((x) - m_logicalOriginX)*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX + m_deviceOriginX);
+    return (long) ((x - m_logicalOriginX)*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX + m_deviceOriginX);
 }
 
 long wxDCBase::LogicalToDeviceXRel(long x) const
 {
-    return (long) (floor(x)*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX);
+    return (long) (x*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX);
 }
 
 long wxDCBase::LogicalToDeviceY(long y) const
 {
-    return (long) (floor((y) - m_logicalOriginY)*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY + m_deviceOriginY);
+    return (long) ((y - m_logicalOriginY)*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY + m_deviceOriginY);
 }
 
 long wxDCBase::LogicalToDeviceYRel(long y) const
 {
-    return (long) (floor(y)*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY);
+    return (long) (y*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY);
 }
 
 // ---------------------------------------------------------------------------