comparison src/cagou/core/image.py @ 101:d5ede9281e4c

core (image): AsyncImage now handle file:// schema in source
author Goffi <goffi@goffi.org>
date Thu, 05 Jan 2017 20:36:40 +0100
parents 56838ad5c84b
children
comparison
equal deleted inserted replaced
100:d7447c585603 101:d5ede9281e4c
69 self._coreimage = ci = None 69 self._coreimage = ci = None
70 70
71 if ci: 71 if ci:
72 ci.bind(on_texture=self._on_tex_change) 72 ci.bind(on_texture=self._on_tex_change)
73 self.texture = ci.texture 73 self.texture = ci.texture
74
75
76 class AsyncImage(kivy_img.AsyncImage):
77 """AsyncImage which accept file:// schema"""
78
79 def _load_source(self, *args):
80 if self.source.startswith('file://'):
81 self.source = self.source[7:]
82 else:
83 super(AsyncImage, self)._load_source(*args)
84