|
|
|
@ -1,14 +1,16 @@
|
|
|
|
|
# Importation |
|
|
|
|
|
|
|
|
|
from formes import triangle_equilateral |
|
|
|
|
|
|
|
|
|
from formes import rectangle |
|
|
|
|
from formes import porte |
|
|
|
|
|
|
|
|
|
# Fonction gestion des données |
|
|
|
|
|
|
|
|
|
def determiner_immeuble(numero:int) -> dict: |
|
|
|
|
caracteristiques = {} |
|
|
|
|
caracteristiques['couleur_facade'] = 'blue' |
|
|
|
|
caracteristiques['numero'] = numero |
|
|
|
|
caracteristiques['bas_imeuble'] = -100 + numero * 140 |
|
|
|
|
caracteristiques['bas_imeuble'] = -300 + numero * 240 |
|
|
|
|
return caracteristiques |
|
|
|
|
|
|
|
|
|
# Fonctions d'interface graphique |
|
|
|
@ -19,10 +21,15 @@ def dessiner_facade(informations:dict):
|
|
|
|
|
facade['fond'] = informations['couleur_facade'] |
|
|
|
|
facade['épaisseur'] = 0 * informations['numero'] |
|
|
|
|
x0 = informations['bas_imeuble'] |
|
|
|
|
triangle_equilateral(140, facade, (x0,0)) |
|
|
|
|
rectangle(140, 4*80, facade, (x0,0)) |
|
|
|
|
|
|
|
|
|
def dessiner_porte(informations:dict): |
|
|
|
|
pass |
|
|
|
|
porte = {} # pour faire la "traduction" entre les clés de ce module et les clés du module formes |
|
|
|
|
porte['ecriture'] = 'red' |
|
|
|
|
porte['fond'] = informations ['couleur_porte'] = 'red' |
|
|
|
|
porte['epaisseur'] = 1 |
|
|
|
|
x0 = informations ['position_porte'] |
|
|
|
|
rectangle(30,40, (x0,0)) |
|
|
|
|
|
|
|
|
|
def dessiner_immeuble(informations:dict): |
|
|
|
|
dessiner_facade(informations) |
|
|
|
|