-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimagens3.py
72 lines (56 loc) · 1.6 KB
/
imagens3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 15 13:41:58 2019
@author: manolo
"""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 15 13:41:19 2019
@author: manolo
"""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 11 14:49:58 2019
@author: manolo
"""
import time
from kivy.app import App
from kivy.uix.image import Image
from kivy.uix.widget import Widget
from kivy.uix.boxlayout import BoxLayout
from kivy.clock import Clock
import os
os.environ["KIVY_IMAGE"]="pil"
#rgb 40, 40 30
class ShowImage(Image):
pass
class MyApp(App):
def build(self):
root = BoxLayout()
root.add_widget(self.c)
self.im.keep_ratio= False
self.im.keep_data= True
self.im.anim_delay = 0.2
imagem = './gif/00_loading.gif'
#return ShowImage(source=imagem, anim_delay= 0.1,
#mipmap= True, allow_stretch= True)
return ShowImage(source=imagem, anim_delay = 0.04)
#return ShowImage(source='./gif/theta.jpeg',pos=(0,0),size=(512,512))
Clock.schedule_once(self.callback, 3.0)
def callback(self, value):
self.im.source='./gif/novos/07_smile.gif'
self.im.keep_ratio= False
self.im.keep_data= True
self.im.anim_delay = 0.004
#self.c.add_widget(self.im2)
#Clock.schedule_once(self.apresentacao, 2.0)
#self.c.clear_widgets()
#Clock.schedule_once(self.callback1, 2.0)
print('caraca')
if __name__ == '__main__':
MyApp().run()
#time.sleep(2)
MyApp.on_stop()