python - How to load an image in kivy? -


my code:

.py file:

class picture(image):     pass  class blablabla(hatwidget):     ...     self.add_widget(picture(sourse='paper.png')) 

.kv file:

<picture>:     canvas:         color:             rgb: (1, 1, 1)         rectangle:             texture: self.texture             size: self.size             pos: self.pos 

but thing have white screen

i'm pretty sure image property set image source not sourse.

also, you'll want remove base rule if want display image yourself.

<-picture>

the "-" tell kv drop rule inherited image.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -