mirror of https://github.com/kivy/kivy.git
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:
parent
cd3bb4e504
commit
17b9c42807
|
@ -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.
|
||||
'''
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue