canvas: add ask_update() method to ask for an update on next frame.

(basically, it just call flag_update() method.)
+ use it in Video()
This commit is contained in:
Mathieu Virbel 2011-02-25 01:08:00 +01:00
parent cd3bb4e504
commit 17b9c42807
2 changed files with 8 additions and 0 deletions

View File

@ -368,6 +368,13 @@ cdef class Canvas(CanvasBase):
c.rremove(self)
self.flag_update()
def ask_update(self):
'''Ask the canvas to update itself the next frame.
Can be useful when a texture content is changing, but anything else in
the canvas.
'''
self.flag_update()
property before:
'''Property for getting the before group.
'''

View File

@ -117,6 +117,7 @@ class Video(Image):
self.duration = self._video.duration
self.position = self._video.position
self.texture = self._video.texture
self.canvas.ask_update()
def _on_eos(self, *largs):
self.eos = True