From dc9e10c054527b1f32fa794cb025a8f06b8ed7b7 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 21 Oct 2008 19:57:25 +0000 Subject: [PATCH] Started work on the gradiation rectangle. The handling in the operation engine should work pretty well. I would like to do some changes, however (displaying the bottomright of the rectangle, and use XOR for the vector, for example) Now, i have to do the real thing, the gradiation calculation and drawing. But let's see that tomorrow... git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@299 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- boutons.c | 12 ++- boutons.h | 2 + const.h | 3 +- gfx2.cfg | Bin 10062 -> 10062 bytes global.h | 3 +- init.c | 13 ++- operatio.c | 224 ++++++++++++++++++++++++++++++++++++++++++++++++++ operatio.h | 10 +++ tables_aide.h | 3 + 9 files changed, 264 insertions(+), 6 deletions(-) diff --git a/boutons.c b/boutons.c index 4b19a079..1b4c48db 100644 --- a/boutons.c +++ b/boutons.c @@ -110,7 +110,7 @@ void Message_Non_disponible(void) // ne sait pas lequel c'est, on les désenclenche tous. De toutes façons, ça // ne sert à rien d'essayer d'optimiser ça puisque l'utilisateur ne devrait // pas souvent l'appeler, et en plus y'en a pas beaucoup à désenclencher. ;) - Desenclencher_bouton(BOUTON_GRADRECT); +// Desenclencher_bouton(BOUTON_GRADRECT); Desenclencher_bouton(BOUTON_TEXTE); Afficher_curseur(); @@ -2029,7 +2029,7 @@ void Bouton_Degrades(void) } -// -- Gestion des boutons de cercle (ellipse) dégradé(e) -------------------- +// -- Gestion des boutons de cercle / ellipse / rectangle dégradés -------------------- void Bouton_Cercle_degrade(void) { @@ -2047,6 +2047,14 @@ void Bouton_Ellipse_degrade(void) } +void Bouton_Rectangle_degrade(void) +{ + Effacer_curseur(); + Demarrer_pile_operation(OPERATION_RECTANGLE_DEGRADE); + Afficher_curseur(); +} + + // -- Gestion du bouton de remplissage --------------------------------------- void Bouton_Fill(void) diff --git a/boutons.h b/boutons.h index 28d4ebd9..46d921ac 100644 --- a/boutons.h +++ b/boutons.h @@ -64,9 +64,11 @@ void Bouton_Rectangle_plein(void); // Boutons relatifs aux dégradés void Bouton_Degrades(void); void Degrade_Charger_infos_du_tableau(int Indice); + // Boutons relatifs aux cercles (ellipses) dégradé(e)s void Bouton_Cercle_degrade(void); void Bouton_Ellipse_degrade(void); +void Bouton_Rectangle_degrade(void); // Boutons relatifs aux cercles (ellipses) plein(e)s et vides void Bouton_Cercle_vide(void); diff --git a/const.h b/const.h index 02a1693c..62c0fd28 100644 --- a/const.h +++ b/const.h @@ -40,7 +40,7 @@ #define NB_BOUTONS 38 // Nombre de boutons à gérer #define NB_TOUCHES 134 // Nombre de combinaisons de touches #define NB_TOUCHES_SPECIALES 72 // Nombre de touches spéciales -#define NB_OPERATIONS 32 // Nombre d'opérations gérées par le moteur +#define NB_OPERATIONS 33 // Nombre d'opérations gérées par le moteur #define NB_FACTEURS_DE_ZOOM 12 // Nombre de facteurs de zoom #define LARGEUR_MENU 254 // Largeur du menu en taille réelle #define HAUTEUR_MENU 44 // Hauteur du menu en taille réelle @@ -392,6 +392,7 @@ enum OPERATIONS OPERATION_TOURNER_BROSSE, // Faire tourner brosse OPERATION_ETIRER_BROSSE, // Etirer brosse OPERATION_DEFORMER_BROSSE, // Deformer brosse + OPERATION_RECTANGLE_DEGRADE, // Rectangle dégradé OPERATION_AUCUNE }; diff --git a/gfx2.cfg b/gfx2.cfg index 65855ba3059edcd3c576738c06329d4c439f5a0d..e042b4a6cc7d234b3b4814e27bf94be346d136d1 100644 GIT binary patch delta 37 ncmX@-cg}BvzbdzYJ_8V}0Aj|;fy!4m>#K<~axgJ4f*KmY)G^#*