[gnue] r9481 - trunk/gnue-forms/src/uidrivers/wx26/widgets

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: reinhard
Date: 2007-04-10 08:41:28 -0500 (Tue, 10 Apr 2007)
New Revision: 9481

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
Log:
Avoid truncating size factors to integers.


Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py	2007-04-10 10:06:43 UTC (rev 9480)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py	2007-04-10 13:41:28 UTC (rev 9481)
@@ -709,11 +709,11 @@
         w = self.__image.GetWidth()
         h = self.__image.GetHeight()
         if w * scale_x > canvas_w:
-            scale_y = scale_y / (w * scale_x / canvas_w)
-            scale_x = canvas_w / w
+            scale_y = float(scale_y) / (w * scale_x / canvas_w)
+            scale_x = float(canvas_w) / w
         if h * scale_y > canvas_h:
-            scale_x = scale_x / (h * scale_y / canvas_h)
-            scale_y = canvas_h / h
+            scale_x = float(scale_x) / (h * scale_y / canvas_h)
+            scale_y = float(canvas_h) / h
 
         # and now, scale by factor
         w = int (w * scale_x + 0.5)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.