kivy_image_avec_alpha_sur_fond_blanc
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
kivy_image_avec_alpha_sur_fond_blanc [2020/01/02 12:32] – [Quel est le problème] serge | kivy_image_avec_alpha_sur_fond_blanc [2020/01/18 11:08] – [Arrière plan blanc sous une image avec canal alpha] serge | ||
---|---|---|---|
Ligne 5: | Ligne 5: | ||
</ | </ | ||
+ | {{ :: | ||
===== Arrière plan blanc sous une image avec canal alpha===== | ===== Arrière plan blanc sous une image avec canal alpha===== | ||
Ligne 17: | Ligne 17: | ||
from kivy.app import App | from kivy.app import App | ||
from kivy.uix.screenmanager import Screen | from kivy.uix.screenmanager import Screen | ||
- | from kivy.uix.widget import Widget | + | from kivy.properties import ListProperty |
- | from kivy.properties import | + | |
from kivy.lang import Builder | from kivy.lang import Builder | ||
Ligne 33: | Ligne 32: | ||
Rectangle: | Rectangle: | ||
# self.size = taille du BoxLayout | # self.size = taille du BoxLayout | ||
- | size: self.size[0]/2, self.size[0]/ | + | size: root.taille |
- | pos: self.pos | + | pos: 200, 200 |
source: " | source: " | ||
''' | ''' | ||
class Main(Screen): | class Main(Screen): | ||
- | | + | |
+ | taille = ListProperty([200, | ||
+ | |||
+ | # taille peut être modifié ensuite avec l' | ||
class FondBlancApp(App): | class FondBlancApp(App): | ||
Ligne 49: | Ligne 51: | ||
</ | </ | ||
- | {{tag> | + | {{tag> |
kivy_image_avec_alpha_sur_fond_blanc.txt · Dernière modification : 2020/10/29 13:50 de serge