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/02/08 12:17] – [Kivy: Une image avec canal alpha sur un fond blanc dans un BoxLayout] serge | ||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
**[[http:// | **[[http:// | ||
</ | </ | ||
- | + | <WRAP center round box 40% centeralign> | |
+ | **[[les_pages_kivy_en_details|Les pages Kivy en détails]]** | ||
+ | </ | ||
+ | {{ :: | ||
===== Arrière plan blanc sous une image avec canal alpha===== | ===== Arrière plan blanc sous une image avec canal alpha===== | ||
Ligne 17: | Ligne 19: | ||
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 34: | ||
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 53: | ||
</ | </ | ||
- | {{tag> | + | {{tag> |
kivy_image_avec_alpha_sur_fond_blanc.txt · Dernière modification : 2020/10/29 13:50 de serge