Commits

aholkner  committed f135a2b

OS X compatibility changes

  • Participants
  • Parent commits 3803223
  • Branches ctypes-soc

Comments (0)

Files changed (5)

 ------------------
  - Filled ellipse does not hang when rx or ry == 0
  - Allow rotozoom on 24 bit surfaces
+ - Rect.topleft.set fixed
+ - transform.rotate on big endian fixed
+ - Workaround for TTF_RenderText_Solid not working on OS X
 
 Pygame-ctypes 0.07
 ------------------
 Py 2.3 testing
 
 SDL_syswm.h - platform dependent
+TTF_RenderText_Solid raises exception with no message on OS X
 
 testfile
 

File pygame/font.py

 __docformat__ = 'restructuredtext'
 __version__ = '$Id$'
 
+import sys
+
 from SDL import *
 from SDL.ttf import *
 
                 SDL_FillRect(surf, None, c)
             else:
                 SDL_SetColorKey(surf, SDL_SRCCOLORKEY, 0)
-        elif antialias:
+        elif antialias or sys.platform == 'darwin':
             if not background:
                 surf = TTF_RenderText_Blended(font, text, foreground)
             else:

File pygame/rect.py

         elif name == 'right':
             self._r.x = int(value) - self._r.w
         elif name == 'topleft':
-            self._r.x, self._r.y = int(value)
+            self._r.x, self._r.y = int(value[0]), int(value[1])
         elif name == 'bottomleft':
             self._r.x = int(value[0])
             self._r.y = int(value[1]) - self._r.h

File pygame/transform.py

                                              chr(background >> 8 & 0xff),
                                              chr(background >> 16 & 0xff),
                                              chr(background >> 24 & 0xff))
+        else:
+            background_bytes = '%c%c%c%c' % (chr(background >> 24 & 0xff),
+                                             chr(background >> 16 & 0xff),
+                                             chr(background >> 8 & 0xff),
+                                             chr(background & 0xff))
+
         def repl(match):
             if match.group(0) == '\000\000\000\000':
                 return background_bytes