]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/ogl/_bmpshape.py
wxCheckListBox doesn't require wxUSE_OWNER_DRAWN when using WXUNIVERSAL
[wxWidgets.git] / wxPython / wx / lib / ogl / _bmpshape.py
index 8a12d85a044297eb083775e8431eb38fb5087dd6..c239aab6ddd67ff87748f7dca774191028ae647d 100644 (file)
@@ -11,8 +11,6 @@
 # Licence:      wxWindows license
 #----------------------------------------------------------------------------
 
 # Licence:      wxWindows license
 #----------------------------------------------------------------------------
 
-from __future__ import division
-
 from _basic import RectangleShape
 
 
 from _basic import RectangleShape
 
 
@@ -20,14 +18,14 @@ class BitmapShape(RectangleShape):
     """Draws a bitmap (non-resizable)."""
     def __init__(self):
         RectangleShape.__init__(self, 100, 50)
     """Draws a bitmap (non-resizable)."""
     def __init__(self):
         RectangleShape.__init__(self, 100, 50)
-        self._filename=""
+        self._filename = ""
 
     def OnDraw(self, dc):
         if not self._bitmap.Ok():
             return
 
 
     def OnDraw(self, dc):
         if not self._bitmap.Ok():
             return
 
-        x = self._xpos-self._bitmap.GetWidth() / 2
-        y = self._ypos-self._bitmap.GetHeight() / 2
+        x = self._xpos - self._bitmap.GetWidth() / 2.0
+        y = self._ypos - self._bitmap.GetHeight() / 2.0
         dc.DrawBitmap(self._bitmap, x, y, True)
 
     def SetSize(self, w, h, recursive = True):
         dc.DrawBitmap(self._bitmap, x, y, True)
 
     def SetSize(self, w, h, recursive = True):