예제 #1
0
 def set_image(self, image):
     if image is None:
         self._cObj.SetImage(None)
         return
     if isinstance(image, Bitmap):
         image = ResourceManager._create_image(image)
     elif isinstance(image, pygame.Surface):
         image = ResourceManager._create_image(Bitmap(image))
     elif not isinstance(image, ImageInstance):
         image = ResourceManager.get_image(image)        
     self._image = image
     self._cObj.SetImage(image._cObj)
예제 #2
0
 def create_single(self, s):
     surf = self.create_surface(s)
     img = ResourceManager._create_image(Bitmap(surf))
     return Sprite(img)
예제 #3
0
 def create_single(self, s):
     surf = self.create_surface(s)
     img = ResourceManager._create_image(Bitmap(surf))
     return Sprite(img)