]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
Avoid an assert in wxFrame::SetTitle
[wxWidgets.git] / src / msw / dc.cpp
index f3e5bffa194f01597150c8320fc9fba146552bbd..619844b2ec16debff6a2c30c025fe166afdf2b53 100644 (file)
@@ -29,6 +29,7 @@
 #endif
 
 #ifndef WX_PRECOMP
+    #include "wx/image.h"
     #include "wx/window.h"
     #include "wx/dc.h"
     #include "wx/utils.h"
@@ -1284,13 +1285,13 @@ void wxDC::DoDrawRotatedText(const wxString& text,
 
         // "upper left" and "upper right"
         CalcBoundingBox(x, y);
-        CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(h*sin(rad)));
+        CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad)));
 
         // "bottom left" and "bottom right"
         x += (wxCoord)(h*sin(rad));
         y += (wxCoord)(h*cos(rad));
         CalcBoundingBox(x, y);
-        CalcBoundingBox(x + wxCoord(h*sin(rad)), y + wxCoord(h*cos(rad)));
+        CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad)));
     }
 #endif
 }
@@ -1765,15 +1766,13 @@ void wxDC::SetUserScale(double x, double y)
 {
     WXMICROWIN_CHECK_HDC
 
-#ifndef __WXWINCE__
     if ( x == m_userScaleX && y == m_userScaleY )
         return;
 
     m_userScaleX = x;
     m_userScaleY = y;
 
-    SetMapMode(m_mappingMode);
-#endif
+    this->SetMapMode(m_mappingMode);
 }
 
 void wxDC::SetAxisOrientation(bool xLeftRight, bool yBottomUp)