Mercurial > touhou
comparison pytouhou/ui/sdl/texture.pyx @ 606:3c2f96f1d715
Fix compilation under Cython 0.22, by making the pyx and the pxd declarations’ except clause similar.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 26 Nov 2014 13:36:38 +0100 |
parents | b895ed2de71f |
children | a6af3ff86612 |
comparison
equal
deleted
inserted
replaced
605:d6ead6f0ba80 | 606:3c2f96f1d715 |
---|---|
26 def __init__(self, loader, window): | 26 def __init__(self, loader, window): |
27 self.loader = loader | 27 self.loader = loader |
28 self.window = window | 28 self.window = window |
29 | 29 |
30 | 30 |
31 cdef void load(self, dict anms): | 31 cdef void load(self, dict anms) except *: |
32 for anm in sorted(anms.values(), key=is_ascii): | 32 for anm in sorted(anms.values(), key=is_ascii): |
33 for entry in anm: | 33 for entry in anm: |
34 if entry.texture is None: | 34 if entry.texture is None: |
35 texture = decode_png(self.loader, entry.first_name, entry.secondary_name) | 35 texture = decode_png(self.loader, entry.first_name, entry.secondary_name) |
36 #elif not isinstance(entry.texture, self.texture_class): | 36 #elif not isinstance(entry.texture, self.texture_class): |
51 def __init__(self, fontname, fontsize=16, window=None): | 51 def __init__(self, fontname, fontsize=16, window=None): |
52 self.font = Font(fontname, fontsize) | 52 self.font = Font(fontname, fontsize) |
53 self.window = window | 53 self.window = window |
54 | 54 |
55 | 55 |
56 cdef void load(self, dict labels): | 56 cdef void load(self, dict labels) except *: |
57 cdef NativeText label | 57 cdef NativeText label |
58 | 58 |
59 for i, label in labels.items(): | 59 for i, label in labels.items(): |
60 if label.texture is None: | 60 if label.texture is None: |
61 try: | 61 try: |