]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed calculations in SetMapMode() (use FP division, not integer)
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Jun 2003 22:41:44 +0000 (22:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Jun 2003 22:41:44 +0000 (22:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dc.cpp

index 06fbd633bb04cfea2780ea22261144a27ca9997e..190526870a23c07916285f508b3ae16736b253b2 100644 (file)
@@ -1615,8 +1615,8 @@ void wxDC::SetMapMode(int mode)
             return;
         }
 
-        double mm2pixelsX = pixel_width / mm_width,
-               mm2pixelsY = pixel_height / mm_height;
+        double mm2pixelsX = (double)pixel_width / mm_width,
+               mm2pixelsY = (double)pixel_height / mm_height;
 
         switch (mode)
         {