From 2e68ad55bfbef33fd564f06a45311ef5bdd42bb0 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 21 Jan 2009 16:42:52 +0000 Subject: [PATCH] Remove some more useless files. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@515 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- Anciens fichiers/dpmi.asm | 491 ---- Anciens fichiers/dpmi.h | 39 - Anciens fichiers/gfx2_mem.bat | 92 - Anciens fichiers/make.inc | 4 - Anciens fichiers/oper_bak.c | 4019 --------------------------------- 5 files changed, 4645 deletions(-) delete mode 100644 Anciens fichiers/dpmi.asm delete mode 100644 Anciens fichiers/dpmi.h delete mode 100644 Anciens fichiers/gfx2_mem.bat delete mode 100644 Anciens fichiers/make.inc delete mode 100644 Anciens fichiers/oper_bak.c diff --git a/Anciens fichiers/dpmi.asm b/Anciens fichiers/dpmi.asm deleted file mode 100644 index 5c9fc148..00000000 --- a/Anciens fichiers/dpmi.asm +++ /dev/null @@ -1,491 +0,0 @@ -; Grafx2 - The Ultimate 256-color bitmap paint program -; -; Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud) -; -; Grafx2 is free software; you can redistribute it and/or -; modify it under the terms of the GNU General Public License -; as published by the Free Software Foundation; version 2 -; of the License. -; -; Grafx2 is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with Grafx2; if not, see or -; write to the Free Software Foundation, Inc., -; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -.386P -.MODEL FLAT - - - -_TEXT Segment dword public 'code' - Assume cs:_TEXT, ds:_DATA - - -; -- Fonctions DPMI -- -public Physical_address_mapping -public Free_physical_address_mapping -public Lock_linear_region -public Unlock_linear_region -public Allocate_ldt_descriptor -public Free_ldt_descriptor -public Set_segment_base_address -public Set_segment_limit -public Set_descriptor_access_rights -public Get_segment_base_address - - - - - -Physical_address_mapping proc near - - push ebp - mov ebp,esp - - arg Physical_address:dword,Physical_size:dword,Linear_address_pointer:dword - - push ebx - push esi - push edi - - ; On met dans BX:CX l'adresse physique … mapper - mov eax,Physical_address - mov cx,ax - shr eax,16 - mov bx,ax - - ; On met dans SI:DI la taille de l'adresse physique … mapper - mov eax,Physical_size - mov di,ax - shr eax,16 - mov si,ax - - ; On appelle le service DPMI de mappage d'adresse physique - mov ax,0800h - int 31h - - jc Physical_address_mapping_Erreur - - ; On sauve l'adresse lin‚aire … l'adresse donn‚e - mov eax,Linear_address_pointer - mov [eax+00h],cx - mov [eax+02h],bx - ; Et on renvoie un code d'erreur nul - xor ax,ax - - Physical_address_mapping_Erreur: - - pop edi - pop esi - pop ebx - - mov esp,ebp - pop ebp - - ret - -Physical_address_mapping endp - - - - - -Free_physical_address_mapping proc near - - push ebp - mov ebp,esp - - arg Linear_address:dword - - push ebx - - ; On met dans BX:CX l'adresse lin‚aire … d‚mapper - mov eax,Linear_address - mov cx,ax - shr eax,16 - mov bx,ax - - ; On appel le service DPMI de lib‚ration d'un mappage d'adresse physique - mov ax,0801h - int 31h - - jc Free_physical_address_mapping_Erreur - - ; On renvoie un code d'erreur nul - xor ax,ax - - Free_physical_address_mapping_Erreur: - - pop ebx - - mov esp,ebp - pop ebp - - ret - -Free_physical_address_mapping endp - - - - - -Lock_linear_region proc near - - push ebp - mov ebp,esp - - arg Linear_address:dword,Linear_size:dword - - push ebx - push esi - push edi - - ; On met dans BX:CX l'adresse lin‚aire … locker - mov eax,Linear_address - mov cx,ax - shr eax,16 - mov bx,ax - - ; On met dans SI:DI la taille de l'adresse lin‚aire … locker - mov eax,Linear_size - mov di,ax - shr eax,16 - mov si,ax - - ; On appel le service DPMI de lockage d'adresse lin‚aire - mov ax,0600h - int 31h - - jc Lock_linear_region_Erreur - - ; On renvoie un code d'erreur nul - xor ax,ax - - Lock_linear_region_Erreur: - - pop edi - pop esi - pop ebx - - mov esp,ebp - pop ebp - - ret - -Lock_linear_region endp - - - - - - -Unlock_linear_region proc near - - push ebp - mov ebp,esp - - arg Linear_address:dword,Linear_size:dword - - push ebx - push esi - push edi - - ; On met dans BX:CX l'adresse lin‚aire … d‚locker - mov eax,Linear_address - mov cx,ax - shr eax,16 - mov bx,ax - - ; On met dans SI:DI la taille de l'adresse lin‚aire … d‚locker - mov eax,Linear_size - mov di,ax - shr eax,16 - mov si,ax - - ; On appel le service DPMI de d‚lockage d'adresse lin‚aire - mov ax,0601h - int 31h - - jc Unlock_linear_region_Erreur - - ; On renvoie un code d'erreur nul - xor ax,ax - - Unlock_linear_region_Erreur: - - pop edi - pop esi - pop ebx - - mov esp,ebp - pop ebp - - ret - -Unlock_linear_region endp - - - - - - - -Allocate_ldt_descriptor proc near - - push ebp - mov ebp,esp - - arg Nombre_de_descripteurs:word,Base_selector_pointer:dword - - push ebx - push esi - push edi - - ; On met dans CX le nombre de descripteurs ldt … allouer - mov cx,Nombre_de_descripteurs - - ; On appel le service DPMI d'allocation de descripteurs ldt - mov ax,0000h - int 31h - - jc Allocate_ldt_descriptor_Erreur - - ; On sauve la valeur du s‚lecteur de base - mov ebx,Base_selector_pointer - mov [ebx],ax - ; Et on renvoie un code d'erreur nul - xor ax,ax - - Allocate_ldt_descriptor_Erreur: - - pop edi - pop esi - pop ebx - - mov esp,ebp - pop ebp - - ret - -Allocate_ldt_descriptor endp - - - - - - -Free_ldt_descriptor proc near - - push ebp - mov ebp,esp - - arg Selector:word - - push ebx - push esi - push edi - - ; On met dans BX le descripteur ldt … lib‚rer - mov bx,Selector - - ; On appel le service DPMI de lib‚ration de descripteur ldt - mov ax,0001h - int 31h - - jc Free_ldt_descriptor_Erreur - - ; On renvoie un code d'erreur nul - xor ax,ax - - Free_ldt_descriptor_Erreur: - - pop edi - pop esi - pop ebx - - mov esp,ebp - pop ebp - - ret - -Free_ldt_descriptor endp - - - - - - -Set_segment_base_address proc near - - push ebp - mov ebp,esp - - arg Selector:word,Linear_base_address:dword - - push ebx - - ; On met dans CX:DX l'adresse de base lin‚aire … assigner au segment - mov eax,Linear_base_address - mov dx,ax - shr eax,16 - mov cx,ax - - ; On met dans BX le s‚lecteur auquel il faut assigner l'adresse de base - mov bx,Selector - - ; On appel le service DPMI d'assignation d'adresse de base … un segment - mov ax,0007h - int 31h - - jc Set_segment_base_address_Erreur - - ; On renvoie un code d'erreur nul - xor ax,ax - - Set_segment_base_address_Erreur: - - pop ebx - - mov esp,ebp - pop ebp - - ret - -Set_segment_base_address endp - - - - - - -Set_segment_limit proc near - - push ebp - mov ebp,esp - - arg Selector:word,Segment_limit:dword - - push ebx - - ; On met dans CX:DX la limite (taille) … assigner au segment - mov eax,Segment_limit - mov dx,ax - shr eax,16 - mov cx,ax - - ; On met dans BX le s‚lecteur auquel il faut assigner une limite - mov bx,Selector - - ; On appel le service DPMI d'assignation de limite … un segment - mov ax,0008h - int 31h - - jc Set_segment_limit_Erreur - - ; On renvoie un code d'erreur nul - xor ax,ax - - Set_segment_limit_Erreur: - - pop ebx - - mov esp,ebp - pop ebp - - ret - -Set_segment_limit endp - - - - - -Set_descriptor_access_rights proc near - - push ebp - mov ebp,esp - - arg Selector:word,Rights:word - - push ebx - - ; On met dans CX les droits … assigner au segment - mov cx,Rights - - ; On met dans BX le s‚lecteur auquel il faut assigner des droits - mov bx,Selector - - ; On appel le service DPMI d'assignation de droits … un segment - mov ax,0009h - int 31h - - jc Set_descriptor_access_rights_Erreur - - ; On renvoie un code d'erreur nul - xor ax,ax - - Set_descriptor_access_rights_Erreur: - - pop ebx - - mov esp,ebp - pop ebp - - ret - - - -Set_descriptor_access_rights endp - - - - - - -Get_segment_base_address proc near - - push ebp - mov ebp,esp - - arg Selector:word,Linear_base_address_pointer:dword - - push ebx - - ; On met dans BX le s‚lecteur dont il faut lire l'adresse de base - mov bx,Selector - - ; On appel le service DPMI de lecture d'adresse de base d'un segment - mov ax,0006h - int 31h - - jc Get_segment_base_address_Erreur - - ; On sauve l'adresse de base lin‚aire du segment - mov eax,Linear_base_address_pointer - mov [eax+00h],dx - mov [eax+02h],cx - ; On renvoie un code d'erreur nul - xor ax,ax - - Get_segment_base_address_Erreur: - - pop ebx - - mov esp,ebp - pop ebp - - ret - -Get_segment_base_address endp - - - - - -_TEXT ENDS -END diff --git a/Anciens fichiers/dpmi.h b/Anciens fichiers/dpmi.h deleted file mode 100644 index d65f97a2..00000000 --- a/Anciens fichiers/dpmi.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Grafx2 - The Ultimate 256-color bitmap paint program - - Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud) - - Grafx2 is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; version 2 - of the License. - - Grafx2 is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Grafx2; if not, see or - write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#ifndef _DPMI_H_ -#define _DPMI_H_ - - - - word Physical_address_mapping(byte * Physical_address,dword Size,byte * * Linear_address_pointer); - word Free_physical_address_mapping(byte * Linear_address); - word Lock_linear_region(byte * Linear_address,dword Size); - word Unlock_linear_region(byte * Linear_address,dword Size); - word Allocate_ldt_descriptor(word Nombre_de_descripteurs,word * Base_selector_pointer); - word Free_ldt_descriptor(word Selector); - word Set_segment_base_address(word Selector,byte * Linear_base_address); - word Set_segment_limit(word Selector,dword Segment_limit); - word Set_descriptor_access_rights(word Selector,word Rights); - word Get_segment_base_address(word Selector,byte * * Linear_base_address_pointer); - - - -#endif diff --git a/Anciens fichiers/gfx2_mem.bat b/Anciens fichiers/gfx2_mem.bat deleted file mode 100644 index e14ccf15..00000000 --- a/Anciens fichiers/gfx2_mem.bat +++ /dev/null @@ -1,92 +0,0 @@ -@ Grafx2 - The Ultimate 256-color bitmap paint program -@ -@ Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud) -@ -@ Grafx2 is free software; you can redistribute it and/or -@ modify it under the terms of the GNU General Public License -@ as published by the Free Software Foundation; version 2 -@ of the License. -@ -@ Grafx2 is distributed in the hope that it will be useful, -@ but WITHOUT ANY WARRANTY; without even the implied warranty of -@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -@ GNU General Public License for more details. -@ -@ You should have received a copy of the GNU General Public License -@ along with Grafx2; if not, see or -@ write to the Free Software Foundation, Inc., -@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -@echo off - -rem -rem This batch file will run GrafX2 with a disk cache of 16 megabytes. -rem Use it ONLY IF you don't have enough memory to run GrafX2. -rem -rem (Ce fichier de commandes lancera GrafX2 avec un cache disque de 16 Mo. -rem Ne l'utilisez QUE SI vous n'avez pas assez de m‚moire pour lancer GrafX2.) -rem - - - -rem -rem Modify the following line in order to indicate the path to DOS4GW.EXE. -rem (Modifiez la ligne suivante afin d'indiquer le chemin de DOS4GW.EXE) -rem - -set PATHDOS4GW=DOS4GW.EXE - - -rem -rem Modify the following line in order to indicate the path to GFX2.EXE. -rem (Modifiez la ligne suivante afin d'indiquer le chemin de GFX2.EXE) -rem - -set PATHGFX2=C:\GFX2\GFX2.EXE - - -if "%1"=="/novm" goto NOVM -rem -rem The following line may not work correctly on some computers. In this case, -rem please read the DOS4GW manual which is not supplied with GrafX2. -rem -rem (La ligne suivante peut ne pas fonctionner correctement sur certains -rem ordinateurs. Dans ce cas, veuillez vous r‚f‚rer au manuel de DOS4GW qui -rem n'est pas fourni avec GrafX2) -rem - -set DOS4GVM=1 -:NOVM - - -rem -rem The following lines will execute GrafX2 -rem (Les lignes suivantes ‚x‚cuteront GrafX2) -rem - -if not exist %PATHDOS4GW% goto DOSNOTFOUND -if not exist %PATHGFX2% goto GFXNOTFOUND - -if "%1"=="/novm" goto RUNNOVM -%PATHDOS4GW% %PATHGFX2% %1 -goto END -:RUNNOVM -%PATHDOS4GW% %PATHGFX2% %2 -goto END - -:DOSNOTFOUND -echo DOS4GW.EXE not found: please edit the GFX2_MEM.BAT file and enter its location. -goto END -:GFXNOTFOUND -echo GFX2.EXE not found: please edit the GFX2_MEM.BAT file and enter its location. -:END - - -rem -rem The following lines will remove all the environnement variables. -rem (Les lignes suivantes supprimeront toutes les variables d'environnement) -rem - -set DOS4GVM= -set PATHGFX2= -set PATHDOS4GW= diff --git a/Anciens fichiers/make.inc b/Anciens fichiers/make.inc deleted file mode 100644 index b162f999..00000000 --- a/Anciens fichiers/make.inc +++ /dev/null @@ -1,4 +0,0 @@ -system dos4g -op stub=weoslite.exe -file video,divers,graph,init,special,boutons,palette,aide,operatio,loadsave,readline,moteur,main,files,dpmi,vesalfb,op_c,op_asm -name gfx2 diff --git a/Anciens fichiers/oper_bak.c b/Anciens fichiers/oper_bak.c deleted file mode 100644 index b9fe5554..00000000 --- a/Anciens fichiers/oper_bak.c +++ /dev/null @@ -1,4019 +0,0 @@ -/* Grafx2 - The Ultimate 256-color bitmap paint program - - Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud) - - Grafx2 is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; version 2 - of the License. - - Grafx2 is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Grafx2; if not, see or - write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -#include -#include "const.h" -#include "struct.h" -#include "global.h" -#include "divers.h" -#include "moteur.h" -#include "graph.h" -#include "operatio.h" - -#include -#include - -void Demarrer_pile_operation(word Operation_demandee) -{ - // On m‚morise l'op‚ration pr‚c‚dente si on d‚marre une interruption - switch(Operation_demandee) - { - case OPERATION_LOUPE : - case OPERATION_PIPETTE : - case OPERATION_PRISE_BROSSE : - case OPERATION_POLYBROSSE : - case OPERATION_ETIRER_BROSSE: - Operation_avant_interruption=Operation_en_cours; - // On passe … l'operation demand‚e - Operation_en_cours=Operation_demandee; - break; - default : - // On passe … l'operation demand‚e - Operation_en_cours=Operation_demandee; - Operation_avant_interruption=Operation_en_cours; - } - - // On sp‚cifie si l'op‚ration autorise le changement de couleur au clavier - switch(Operation_demandee) - { - case OPERATION_DESSIN_CONTINU: - case OPERATION_DESSIN_DISCONTINU: - case OPERATION_SPRAY: - case OPERATION_LIGNES_CENTREES: - Autoriser_changement_de_couleur_pendant_operation=1; - break; - default : - Autoriser_changement_de_couleur_pendant_operation=0; - } - - // Et on passe au curseur qui va avec - Forme_curseur=CURSEUR_D_OPERATION[Operation_demandee]; - Operation_Taille_pile=0; -} - - -void Initialiser_debut_operation(void) -{ - Operation_dans_loupe=(Mouse_X>=Principal_X_Zoom); - Smear_Debut=1; -} - - -void Operation_PUSH(short Valeur) -{ - Operation_Pile[++Operation_Taille_pile]=Valeur; -} - - -void Operation_POP(short * Valeur) -{ - *Valeur=Operation_Pile[Operation_Taille_pile--]; -} - - -byte Pinceau_Forme_avant_operation; -byte Cacher_pinceau_avant_operation; - - - -short Distance(short X1, short Y1, short X2, short Y2) -{ - short X2_moins_X1=X2-X1; - short Y2_moins_Y1=Y2-Y1; - - return Round( sqrt( (X2_moins_X1*X2_moins_X1) + (Y2_moins_Y1*Y2_moins_Y1) ) ); -} - - -void Aff_coords_rel_ou_abs(short Debut_X, short Debut_Y) -{ - char Chaine[6]; - - if (Config.Coords_rel) - { - if (Menu_visible) - { - if (Pinceau_X>Debut_X) - { - Num2str(Pinceau_X-Debut_X,Chaine,5); - Chaine[0]='+'; - } - else if (Pinceau_XDebut_Y) - { - Num2str(Pinceau_Y-Debut_Y,Chaine,5); - Chaine[0]='+'; - } - else if (Pinceau_Y>1); - Loupe_Decalage_Y=Mouse_Y-(Loupe_Hauteur>>1); - - // Calcul du coin haut_gauche de la fenˆtre devant ˆtre zoom‚e DANS L'ECRAN - if (Loupe_Decalage_X+Loupe_Largeur>=Limite_Droite-Principal_Decalage_X) - Loupe_Decalage_X=Limite_Droite-Loupe_Largeur-Principal_Decalage_X+1; - if (Loupe_Decalage_Y+Loupe_Hauteur>=Limite_Bas-Principal_Decalage_Y) - Loupe_Decalage_Y=Limite_Bas-Loupe_Hauteur-Principal_Decalage_Y+1; - - // Calcul des coordonn‚es absolues de ce coin DANS L'IMAGE - Loupe_Decalage_X+=Principal_Decalage_X; - Loupe_Decalage_Y+=Principal_Decalage_Y; - - if (Loupe_Decalage_X<0) - Loupe_Decalage_X=0; - if (Loupe_Decalage_Y<0) - Loupe_Decalage_Y=0; - - // On calcule les bornes visibles dans l'‚cran - Recadrer_ecran_par_rapport_au_zoom(); - Calculer_limites(); - Afficher_ecran(); - - // Repositionner le curseur en fonction des coordonn‚es visibles - Calculer_coordonnees_pinceau(); - - // On fait de notre mieux pour restaurer l'ancienne op‚ration: - Demarrer_pile_operation(Operation_avant_interruption); -} - -/////////////////////////////////////////////////// OPERATION_RECTANGLE_????? - -void Rectangle_12_0(void) -// Op‚ration : OPERATION_RECTANGLE_VIDE / OPERATION_RECTANGLE_PLEIN -// Click Souris: 1 ou 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -{ - Initialiser_debut_operation(); - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("\035: 1 \022: 1",0); - // On laisse une trace du curseur … l'‚cran - Afficher_curseur(); - - if (Mouse_K==A_GAUCHE) - { - Shade_Table=Shade_Table_gauche; - Operation_PUSH(Fore_color); - } - else - { - Shade_Table=Shade_Table_droite; - Operation_PUSH(Back_color); - } - - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Rectangle_12_5(void) -// Op‚ration : OPERATION_RECTANGLE_VIDE / OPERATION_RECTANGLE_PLEIN -// Click Souris: 1 ou 2 -// Taille_Pile : 5 -// -// Souris effac‚e: Non -{ - short Debut_X; - short Debut_Y; - short Ancien_X; - short Ancien_Y; - char Chaine[5]; - - Operation_POP(&Ancien_Y); - Operation_POP(&Ancien_X); - - if ((Pinceau_X!=Ancien_X) || (Pinceau_Y!=Ancien_Y)) - { - Operation_POP(&Debut_Y); - Operation_POP(&Debut_X); - - if ((Config.Coords_rel) && (Menu_visible)) - { - Num2str(((Debut_XCentre_X)?Tangente_X-Centre_X - :Centre_X-Tangente_X; - Rayon_vertical =(Tangente_Y>Centre_Y)?Tangente_Y-Centre_Y - :Centre_Y-Tangente_Y; - Effacer_ellipse_vide_Preview(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical); - - Rayon_horizontal=(Pinceau_X>Centre_X)?Pinceau_X-Centre_X - :Centre_X-Pinceau_X; - Rayon_vertical =(Pinceau_Y>Centre_Y)?Pinceau_Y-Centre_Y - :Centre_Y-Pinceau_Y; - Tracer_ellipse_vide_Preview(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical,Couleur); - - Afficher_curseur(); - } - - Operation_PUSH(Couleur); - Operation_PUSH(Centre_X); - Operation_PUSH(Centre_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Ellipse_vide_0_5(void) -// -// Op‚ration : OPERATION_ELLIPSE_VIDE -// Click Souris: 0 -// Taille_Pile : 5 (Couleur, X_Centre, Y_Centre, X_Tangente, Y_Tangente) -// -// Souris effac‚e: Oui -// -{ - short Tangente_X; - short Tangente_Y; - short Centre_X; - short Centre_Y; - short Couleur; - short Rayon_horizontal; - short Rayon_vertical; - - Operation_POP(&Tangente_Y); - Operation_POP(&Tangente_X); - Operation_POP(&Centre_Y); - Operation_POP(&Centre_X); - Operation_POP(&Couleur); - - Rayon_horizontal=(Tangente_X>Centre_X)?Tangente_X-Centre_X - :Centre_X-Tangente_X; - Rayon_vertical =(Tangente_Y>Centre_Y)?Tangente_Y-Centre_Y - :Centre_Y-Tangente_Y; - Effacer_ellipse_vide_Preview(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical); - - Pinceau_Forme=Pinceau_Forme_avant_operation; - - Tracer_ellipse_vide_Definitif(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical,Couleur); - - if ( (Config.Coords_rel) && (Menu_visible) ) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } -} - - -void Ellipse_pleine_0_5(void) -// -// Op‚ration : OPERATION_ELLIPSE_PLEINE -// Click Souris: 0 -// Taille_Pile : 5 (Couleur, X_Centre, Y_Centre, X_Tangente, Y_Tangente) -// -// Souris effac‚e: Oui -// -{ - short Tangente_X; - short Tangente_Y; - short Centre_X; - short Centre_Y; - short Couleur; - short Rayon_horizontal; - short Rayon_vertical; - - Operation_POP(&Tangente_Y); - Operation_POP(&Tangente_X); - Operation_POP(&Centre_Y); - Operation_POP(&Centre_X); - Operation_POP(&Couleur); - - Rayon_horizontal=(Tangente_X>Centre_X)?Tangente_X-Centre_X - :Centre_X-Tangente_X; - Rayon_vertical =(Tangente_Y>Centre_Y)?Tangente_Y-Centre_Y - :Centre_Y-Tangente_Y; - Effacer_ellipse_vide_Preview(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical); - - Pinceau_Forme=Pinceau_Forme_avant_operation; - - Tracer_ellipse_pleine(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical,Couleur); - - if ( (Config.Coords_rel) && (Menu_visible) ) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } -} - - -////////////////////////////////////////////////////////////// OPERATION_FILL - - -void Fill_1_0(void) -// -// Op‚ration : OPERATION_FILL -// Click Souris: 1 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -// -{ - // Pas besoin d'initialiser le d‚but d'op‚ration car le Smear n'affecte pas - // le Fill, et on se fout de savoir si on est dans la partie gauche ou - // droite de la loupe. - // On ne s'occupe pas de faire un Backup: c'est "Remplir" qui s'en charge. - Shade_Table=Shade_Table_gauche; - Remplir(Fore_color); - Attendre_fin_de_click(); -} - - -void Fill_2_0(void) -// -// Op‚ration : OPERATION_FILL -// Click Souris: 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -// -{ - // Pas besoin d'initialiser le d‚but d'op‚ration car le Smear n'affecte pas - // le Fill, et on se fout de savoir si on est dans la partie gauche ou - // droite de la loupe. - // On ne s'occupe pas de faire un Backup: c'est "Remplir" qui s'en charge. - Shade_Table=Shade_Table_droite; - Remplir(Back_color); - Attendre_fin_de_click(); -} - - -///////////////////////////////////////////////////////// OPERATION_REMPLACER - - -void Remplacer_1_0(void) -// -// Op‚ration : OPERATION_REMPLACER -// Click Souris: 1 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -// -{ - // Pas besoin d'initialiser le d‚but d'op‚ration car le Smear n'affecte pas - // le Replace, et on se fout de savoir si on est dans la partie gauche ou - // droite de la loupe. - Backup(); -// Shade_Table=Shade_Table_gauche; - Remplacer(Fore_color); - Attendre_fin_de_click(); -} - - -void Remplacer_2_0(void) -// -// Op‚ration : OPERATION_REMPLACER -// Click Souris: 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -// -{ - // Pas besoin d'initialiser le d‚but d'op‚ration car le Smear n'affecte pas - // le Replace, et on se fout de savoir si on est dans la partie gauche ou - // droite de la loupe. - Backup(); -// Shade_Table=Shade_Table_droite; - Remplacer(Back_color); - Attendre_fin_de_click(); -} - - -/////////////////////////////////////////////////////////// OPERATION_PIPETTE - - -void Pipette_12_0(void) -// -// Op‚ration : OPERATION_PIPETTE -// Click Souris: 1 ou 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -// -{ - Initialiser_debut_operation(); - - if (Mouse_K==A_GAUCHE) - { - Encadrer_couleur_menu(CM_Noir); - Fore_color=Pipette_Couleur; - Recadrer_palette(); - Afficher_foreback(); - Encadrer_couleur_menu(CM_Blanc); - } - else - { - Back_color=Pipette_Couleur; - Afficher_foreback(); - } - Operation_PUSH(Mouse_K); -} - - -void Pipette_1_1(void) -// -// Op‚ration : OPERATION_PIPETTE -// Click Souris: 1 -// Taille_Pile : 1 -// -// Souris effac‚e: Non -// -{ - char Chaine[4]; - - if ( (Pinceau_X>=0) && (Pinceau_Y>=0) - && (Pinceau_X=0) && (Pinceau_Y>=0) - && (Pinceau_X=Limite_Gauche+3) - Debut_X=0; - else - Debut_X=3-(Pos_X-Limite_Gauche); - - if (Pos_Y>=Limite_Haut+3) - Debut_Y=0; - else - Debut_Y=3-(Pos_Y-Limite_Haut); - - if (Pos_X<=Limite_visible_Droite-3) - Fin_X=6; - else - Fin_X=3+(Limite_visible_Droite-Pos_X); - - if (Pos_Y<=Limite_visible_Bas-3) - Fin_Y=6; - else - Fin_Y=3+(Limite_visible_Bas-Pos_Y); - - for (i=Debut_X; i<=Fin_X; i++) - { - Temp=Pos_X+i-3; - Pixel_Preview(Temp,Pos_Y,~Lit_pixel(Temp -Principal_Decalage_X, - Pos_Y-Principal_Decalage_Y)); - } - for (i=Debut_Y; i<=Fin_Y; i++) - { - Temp=Pos_Y+i-3; - Pixel_Preview(Pos_X,Temp,~Lit_pixel(Pos_X-Principal_Decalage_X, - Temp -Principal_Decalage_Y)); - } -} - - -void Courbe_34_points_1_0(void) -// -// Op‚ration : OPERATION_COURBE_?_POINTS -// Click Souris: 1 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -// -{ - Initialiser_debut_operation(); - Backup(); - Shade_Table=Shade_Table_gauche; - - Cacher_pinceau=1; - - Pixel_figure_Preview(Pinceau_X,Pinceau_Y,Fore_color); - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("X:ñ 0 Y:ñ 0",0); - - Operation_PUSH(Fore_color); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - -void Courbe_34_points_2_0(void) -// -// Op‚ration : OPERATION_COURBE_?_POINTS -// Click Souris: 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -// -{ - Initialiser_debut_operation(); - Backup(); - Shade_Table=Shade_Table_droite; - - Cacher_pinceau=1; - - Pixel_figure_Preview(Pinceau_X,Pinceau_Y,Back_color); - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("X:ñ 0 Y:ñ 0",0); - - Operation_PUSH(Back_color); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Courbe_34_points_1_5(void) -// -// Op‚ration : OPERATION_COURBE_?_POINTS -// Click Souris: 1 -// Taille_Pile : 5 -// -// Souris effac‚e: Non -// -{ - short X1,X2,Y1,Y2; - - Operation_POP(&Y2); - Operation_POP(&X2); - Operation_POP(&Y1); - Operation_POP(&X1); - - if ( (Y2!=Pinceau_Y) || (X2!=Pinceau_X) ) - { - Effacer_curseur(); - Aff_coords_rel_ou_abs(X1,Y1); - - Effacer_ligne_Preview(X1,Y1,X2,Y2); - Pixel_figure_Preview (X1,Y1,Fore_color); - Tracer_ligne_Preview (X1,Y1,Pinceau_X,Pinceau_Y,Fore_color); - - Afficher_curseur(); - } - - Operation_PUSH(X1); - Operation_PUSH(Y1); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - -void Courbe_34_points_2_5(void) -// -// Op‚ration : OPERATION_COURBE_?_POINTS -// Click Souris: 2 -// Taille_Pile : 5 -// -// Souris effac‚e: Non -// -{ - short X1,X2,Y1,Y2; - - Operation_POP(&Y2); - Operation_POP(&X2); - Operation_POP(&Y1); - Operation_POP(&X1); - - if ( (Y2!=Pinceau_Y) || (X2!=Pinceau_X) ) - { - Effacer_curseur(); - Aff_coords_rel_ou_abs(X1,Y1); - - Effacer_ligne_Preview(X1,Y1,X2,Y2); - Pixel_figure_Preview (X1,Y1,Back_color); - Tracer_ligne_Preview (X1,Y1,Pinceau_X,Pinceau_Y,Back_color); - - Afficher_curseur(); - } - - Operation_PUSH(X1); - Operation_PUSH(Y1); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -byte Cacher_curseur_avant_courbe; - -void Courbe_4_points_0_5(void) -// -// Op‚ration : OPERATION_COURBE_4_POINTS -// Click Souris: 0 -// Taille_Pile : 5 -// -// Souris effac‚e: Oui -// -{ - short X1,Y1,X2,Y2,X3,Y3,X4,Y4; - short Tiers_X,Tiers_Y; - short Couleur; - - Operation_POP(&Y4); - Operation_POP(&X4); - Operation_POP(&Y1); - Operation_POP(&X1); - Operation_POP(&Couleur); - - Tiers_X=Round_div(abs(X4-X1),3); - Tiers_Y=Round_div(abs(Y4-Y1),3); - - if (X1B=(8/3) * C->P - *X3=Round((BX+X4)/2.0); // ú _/úú P3 P2=milieu de [P1,B] - *Y3=Round((BY+Y4)/2.0); // P4*-- P3=milieu de [P4,B] -} - - -void Courbe_3_points_0_5(void) -// -// Op‚ration : OPERATION_COURBE_3_POINTS -// Click Souris: 0 -// Taille_Pile : 5 -// -// Souris effac‚e: Oui -// -{ - short X1,Y1,X2,Y2,X3,Y3,X4,Y4; - short Couleur; - - Operation_POP(&Y4); - Operation_POP(&X4); - Operation_POP(&Y1); - Operation_POP(&X1); - Operation_POP(&Couleur); - - Calculer_courbe_3_points(X1,Y1,X4,Y4,&X2,&Y2,&X3,&Y3); - - Effacer_ligne_Preview(X1,Y1,X4,Y4); - Tracer_courbe_Preview(X1,Y1,X2,Y2,X3,Y3,X4,Y4,Couleur); - - if ( (Config.Coords_rel) && (Menu_visible) ) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } - - Operation_PUSH(Couleur); - Operation_PUSH(X1); - Operation_PUSH(Y1); - Operation_PUSH(X2); - Operation_PUSH(Y2); - Operation_PUSH(X3); - Operation_PUSH(Y3); - Operation_PUSH(X4); - Operation_PUSH(Y4); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Courbe_3_points_0_11(void) -// -// Op‚ration : OPERATION_COURBE_3_POINTS -// Click Souris: 0 -// Taille_Pile : 11 -// -// Souris effac‚e: Non -// -{ - short X1,Y1,X2,Y2,X3,Y3,X4,Y4; - short Old_X,Old_Y; - short Couleur; - - Operation_POP(&Old_Y); - Operation_POP(&Old_X); - - if ( (Pinceau_X!=Old_X) || (Pinceau_Y!=Old_Y) ) - { - Operation_POP(&Y4); - Operation_POP(&X4); - Operation_POP(&Y3); - Operation_POP(&X3); - Operation_POP(&Y2); - Operation_POP(&X2); - Operation_POP(&Y1); - Operation_POP(&X1); - Operation_POP(&Couleur); - - Effacer_curseur(); - Print_coordonnees(); - - Effacer_courbe_Preview(X1,Y1,X2,Y2,X3,Y3,X4,Y4,Couleur); - Calculer_courbe_3_points(X1,Y1,X4,Y4,&X2,&Y2,&X3,&Y3); - Tracer_courbe_Preview (X1,Y1,X2,Y2,X3,Y3,X4,Y4,Couleur); - Afficher_curseur(); - - Operation_PUSH(Couleur); - Operation_PUSH(X1); - Operation_PUSH(Y1); - Operation_PUSH(X2); - Operation_PUSH(Y2); - Operation_PUSH(X3); - Operation_PUSH(Y3); - Operation_PUSH(X4); - Operation_PUSH(Y4); - } - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Courbe_3_points_12_11(void) -// -// Op‚ration : OPERATION_COURBE_3_POINTS -// Click Souris: 1 ou 2 -// Taille_Pile : 11 -// -// Souris effac‚e: Oui -// -{ - short X1,Y1,X2,Y2,X3,Y3,X4,Y4; - short Old_X,Old_Y; - short Couleur; - - Operation_POP(&Old_Y); - Operation_POP(&Old_X); - Operation_POP(&Y4); - Operation_POP(&X4); - Operation_POP(&Y3); - Operation_POP(&X3); - Operation_POP(&Y2); - Operation_POP(&X2); - Operation_POP(&Y1); - Operation_POP(&X1); - Operation_POP(&Couleur); - - Cacher_pinceau=0; - - Effacer_courbe_Preview (X1,Y1,X2,Y2,X3,Y3,X4,Y4,Couleur); - Calculer_courbe_3_points(X1,Y1,X4,Y4,&X2,&Y2,&X3,&Y3); - Tracer_courbe_Definitif(X1,Y1,X2,Y2,X3,Y3,X4,Y4,Couleur); - - Attendre_fin_de_click(); -} - - -///////////////////////////////////////////////////////////// OPERATION_SPRAY - - -void Spray_1_0(void) -// -// Op‚ration : OPERATION_SPRAY -// Click Souris: 1 -// Taille_Pile : 0 -// -// Souris effac‚e: Non -// -{ - Initialiser_debut_operation(); - Backup(); - Shade_Table=Shade_Table_gauche; - Aerographe(A_GAUCHE); - - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(A_GAUCHE); -} - -void Spray_2_0(void) -// -// Op‚ration : OPERATION_SPRAY -// Click Souris: 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Non -// -{ - Initialiser_debut_operation(); - Backup(); - Shade_Table=Shade_Table_droite; - Aerographe(A_DROITE); - - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(A_DROITE); -} - -void Spray_12_3(void) -// -// Op‚ration : OPERATION_SPRAY -// Click Souris: 1 ou 2 -// Taille_Pile : 1 -// -// Souris effac‚e: Non -// -{ - short Bouton_clicke; - short Ancien_X,Ancien_Y; - - Operation_POP(&Bouton_clicke); - Operation_POP(&Ancien_Y); - Operation_POP(&Ancien_X); - - if ( (Menu_visible) && ((Pinceau_X!=Ancien_X) || (Pinceau_Y!=Ancien_Y)) ) - { - Effacer_curseur(); - Print_coordonnees(); - Afficher_curseur(); - } - - Aerographe(Bouton_clicke); - - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Bouton_clicke); -} - -void Spray_0_3(void) -// -// Op‚ration : OPERATION_SPRAY -// Click Souris: 0 -// Taille_Pile : 3 -// -// Souris effac‚e: Non -// -{ - Operation_Taille_pile-=3; -} - - -////////////////////////////////////////////////////////// OPERATION_POLYGONE - - -void Polygone_12_0(void) -// Op‚ration : OPERATION_POLYGONE -// Click Souris: 1 ou 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -{ - byte Couleur; - - Initialiser_debut_operation(); - Backup(); - Shade_Table=(Mouse_K==A_GAUCHE)?Shade_Table_gauche:Shade_Table_droite; - Pinceau_Forme_avant_operation=Pinceau_Forme; - Pinceau_Forme=FORME_PINCEAU_POINT; - - Couleur=(Mouse_K==A_GAUCHE)?Fore_color:Back_color; - - // On place temporairement le d‚but de la ligne qui ne s'afficherait pas sinon - Pixel_figure_Preview(Pinceau_X,Pinceau_Y,Couleur); - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("X:ñ 0 Y:ñ 0",0); - - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Mouse_K | 0x80); - Operation_PUSH(Couleur); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - // Taille de pile 8 : phase d'appui, non interruptible -} - - - -void Polygone_12_9(void) -// Op‚ration : OPERATION_POLYGONE -// Click Souris: 1 ou 2 -// Taille_Pile : 9 -// -// Souris effac‚e: Oui -{ - short Debut_X; - short Debut_Y; - short Fin_X; - short Fin_Y; - short Couleur; - short Direction; - - Operation_POP(&Fin_Y); - Operation_POP(&Fin_X); - Operation_POP(&Debut_Y); - Operation_POP(&Debut_X); - Operation_POP(&Couleur); - Operation_POP(&Direction); - Operation_POP(&Direction); - - if (Direction==Mouse_K) - { - Operation_PUSH(Direction); - Operation_PUSH(Couleur); - Operation_PUSH(Debut_X); - Operation_PUSH(Debut_Y); - Operation_PUSH(Fin_X); - Operation_PUSH(Fin_Y); - // Taille de pile 8 : phase d'appui, non interruptible - } - else - { - // La s‚rie de ligne est termin‚e, il faut donc effacer la derniŠre - // preview de ligne et relier le dernier point avec le premier - Pixel_figure_Preview (Debut_X,Debut_Y,Lit_pixel_dans_ecran_courant(Debut_X,Debut_Y)); - Effacer_ligne_Preview (Debut_X,Debut_Y,Fin_X,Fin_Y); - Operation_POP(&Fin_Y); - Operation_POP(&Fin_X); - Pinceau_Forme=Pinceau_Forme_avant_operation; - // Le pied aurait ‚t‚ de ne pas repasser sur le 1er point de la 1Šre ligne - // mais c'est pas possible :( - Tracer_ligne_Definitif(Debut_X,Debut_Y,Fin_X,Fin_Y,Couleur); - Pinceau_Forme=FORME_PINCEAU_POINT; - - Afficher_curseur(); - Attendre_fin_de_click(); - Effacer_curseur(); - - if ( (Config.Coords_rel) && (Menu_visible) ) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } - - Pinceau_Forme=Pinceau_Forme_avant_operation; - } -} - - -////////////////////////////////////////////////////////// OPERATION_POLYFILL - -short * Polyfill_Table_de_points; -int Polyfill_Nombre_de_points; - -void Polyfill_12_0(void) -// Op‚ration : OPERATION_POLYFILL -// Click Souris: 1 ou 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -{ - byte Couleur; - - Initialiser_debut_operation(); - Backup(); - Shade_Table=(Mouse_K==A_GAUCHE)?Shade_Table_gauche:Shade_Table_droite; - Cacher_pinceau=1; - - Couleur=(Mouse_K==A_GAUCHE)?Fore_color:Back_color; - - Polyfill_Table_de_points=(short *) malloc((Config.Nb_max_de_vertex_par_polygon<<1)*sizeof(short)); - Polyfill_Table_de_points[0]=Pinceau_X; - Polyfill_Table_de_points[1]=Pinceau_Y; - Polyfill_Nombre_de_points=1; - - // On place temporairement le d‚but de la ligne qui ne s'afficherait pas sinon - Pixel_figure_Preview_xor(Pinceau_X,Pinceau_Y,0); - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("X:ñ 0 Y:ñ 0",0); - - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Mouse_K | 0x80); - Operation_PUSH(Couleur); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - // Taille de pile 8 : phase d'appui, non interruptible -} - - -void Polyfill_0_8(void) -// Op‚ration : OPERATION_POLYFILL -// Click Souris: 0 -// Taille_Pile : 8 -// -// Souris effac‚e: Oui -{ - short Debut_X; - short Debut_Y; - short Fin_X; - short Fin_Y; - short Couleur; - short Direction; - - Operation_POP(&Fin_Y); - Operation_POP(&Fin_X); - Operation_POP(&Debut_Y); - Operation_POP(&Debut_X); - Operation_POP(&Couleur); - Operation_POP(&Direction); - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("X:ñ 0 Y:ñ 0",0); - - Tracer_ligne_Preview_xor(Debut_X,Debut_Y,Fin_X,Fin_Y,0); - - if (Direction & 0x80) - Direction=(Direction & 0x7F); - - Operation_PUSH(Direction); // Valeur bidon servant de nouvel ‚tat de pile - Operation_PUSH(Direction); - Operation_PUSH(Couleur); - - Tracer_ligne_Preview_xor(Debut_X,Debut_Y,Pinceau_X,Pinceau_Y,0); - - if (Polyfill_Nombre_de_points1)?Debut_X+(Brosse_Largeur>>1)-1:1; - Hauteur=(Brosse_Hauteur>1)?Debut_Y+(Brosse_Hauteur>>1)-1:1; - break; - case 'X': // Moiti‚ X - Largeur=(Brosse_Largeur>1)?Debut_X+(Brosse_Largeur>>1)-1:1; - Hauteur=Debut_Y+Brosse_Hauteur-1; - break; - case 'Y': // Moiti‚ Y - Largeur=Debut_X+Brosse_Largeur-1; - Hauteur=(Brosse_Hauteur>1)?Debut_Y+(Brosse_Hauteur>>1)-1:1; - break; - case 'n': // Normal - Largeur=Debut_X+Brosse_Largeur-1; - Hauteur=Debut_Y+Brosse_Hauteur-1; - break; - default : - Changement_de_taille=0; - } - } - else - Changement_de_taille=0; - - if (Changement_de_taille) - { - Operation_Taille_pile-=2; - Operation_PUSH(Largeur); - Operation_PUSH(Hauteur); - Operation_PUSH(Debut_X); - Operation_PUSH(Debut_Y); - Operation_PUSH(Largeur); - Operation_PUSH(Hauteur); - } - else - { - Operation_PUSH(Debut_X); - Operation_PUSH(Debut_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_Taille_pile++; - } -} - - -void Etirer_brosse_12_8(void) -// -// Op‚ration : OPERATION_ETIRER_BROSSE -// Click Souris: 0 -// Taille_Pile : 8 -// -// Souris effac‚e: Oui -// -{ - short Calcul_X; - short Calcul_Y; - short Debut_X; - short Debut_Y; - - - Operation_Taille_pile--; - - if (Mouse_K==A_DROITE) - { - Operation_Taille_pile-=2; - Operation_POP(&Debut_Y); - Operation_POP(&Debut_X); - Operation_POP(&Calcul_Y); - Operation_POP(&Calcul_X); - Operation_Taille_pile--; - - // On efface la preview de la brosse (et la croix) - Afficher_ecran(); - - // Et enfin on stocke pour de bon la nouvelle brosse ‚tir‚e - Etirer_Brosse(Debut_X,Debut_Y,Calcul_X,Calcul_Y); - - // Simuler l'appui du bouton "Dessin" - - // Comme l'enclenchement du bouton efface le curseur, il faut l'afficher au - // pr‚alable: - Afficher_curseur(); - // !!! Efface la croix puis affiche le viseur !!! - Enclencher_bouton(BOUTON_DESSIN,A_GAUCHE); // D‚senclenche au passage le bouton brosse - if (Config.Auto_discontinuous) - { - // On se place en mode Dessin discontinu … la main - while (Operation_en_cours!=OPERATION_DESSIN_DISCONTINU) - Enclencher_bouton(BOUTON_DESSIN,A_DROITE); - } - // Maintenant, il faut r‚effacer le curseur parce qu'il sera raffich‚ en fin - // d'appel … cette action: - Effacer_curseur(); - - // On passe en brosse couleur: - Changer_la_forme_du_pinceau(FORME_PINCEAU_BROSSE_COULEUR); - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("X: Y:",0); - Print_coordonnees(); - } -} - - -//////////////////////////////////////////////////////////// OPERATION_SCROLL - - -byte Cacher_curseur_avant_scroll; - -void Scroll_12_0(void) -// -// Op‚ration : OPERATION_SCROLL -// Click Souris: 1 ou 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -// -{ - Initialiser_debut_operation(); - Backup(); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Cacher_curseur_avant_scroll=Cacher_curseur; - Cacher_curseur=1; - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("X:ñ 0 Y:ñ 0",0); -} - - -void Scroll_12_4(void) -// -// Op‚ration : OPERATION_SCROLL -// Click Souris: 1 ou 2 -// Taille_Pile : 4 -// -// Souris effac‚e: Non -// -{ - short Centre_X; - short Centre_Y; - short Pos_X; - short Pos_Y; - short Decalage_X; - short Decalage_Y; - char Chaine[5]; - - Operation_POP(&Pos_Y); - Operation_POP(&Pos_X); - Operation_POP(&Centre_Y); - Operation_POP(&Centre_X); - - if ( (Pinceau_X!=Pos_X) || (Pinceau_Y!=Pos_Y) ) - { - // L'utilisateur a boug‚, il faut scroller l'image - - if (Pinceau_X>=Centre_X) - Decalage_X=(Pinceau_X-Centre_X)%Principal_Largeur_image; - else - Decalage_X=Principal_Largeur_image-((Centre_X-Pinceau_X)%Principal_Largeur_image); - - if (Pinceau_Y>=Centre_Y) - Decalage_Y=(Pinceau_Y-Centre_Y)%Principal_Hauteur_image; - else - Decalage_Y=Principal_Hauteur_image-((Centre_Y-Pinceau_Y)%Principal_Hauteur_image); - - Aff_coords_rel_ou_abs(Centre_X,Centre_Y); - - Scroll_picture(Decalage_X,Decalage_Y); - - Afficher_ecran(); - } - - Operation_PUSH(Centre_X); - Operation_PUSH(Centre_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - -void Scroll_0_4(void) -// -// Op‚ration : OPERATION_SCROLL -// Click Souris: 0 -// Taille_Pile : 4 -// -// Souris effac‚e: Oui -// -{ - Operation_Taille_pile-=4; - Cacher_curseur=Cacher_curseur_avant_scroll; - if ((Config.Coords_rel) && (Menu_visible)) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } -} - - -//////////////////////////////////////////////////// OPERATION_CERCLE_DEGRADE - - -void Cercle_degrade_12_0(void) -// -// Op‚ration : OPERATION_CERCLE_DEGRADE -// Click Souris: 1 ou 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -{ - byte Couleur; - - Initialiser_debut_operation(); - Backup(); - - Shade_Table=(Mouse_K==A_GAUCHE)?Shade_Table_gauche:Shade_Table_droite; - Couleur=(Mouse_K==A_GAUCHE)?Fore_color:Back_color; - - Cacher_pinceau_avant_operation=Cacher_pinceau; - Cacher_pinceau=1; - - Pixel_figure_Preview(Pinceau_X,Pinceau_Y,Couleur); - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("Radius: 0 ",0); - - Operation_PUSH(Mouse_K); - Operation_PUSH(Couleur); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Cercle_degrade_12_6(void) -// -// Op‚ration : OPERATION_CERCLE_DEGRADE -// Click Souris: 1 ou 2 -// Taille_Pile : 6 (Mouse_K, Couleur, X_Centre, Y_Centre, X_Tangente, Y_Tangente) -// -// Souris effac‚e: Non -// -{ - short Tangente_X; - short Tangente_Y; - short Centre_X; - short Centre_Y; - short Couleur; - short Rayon; - char Chaine[5]; - - Operation_POP(&Tangente_Y); - Operation_POP(&Tangente_X); - Operation_POP(&Centre_Y); - Operation_POP(&Centre_X); - Operation_POP(&Couleur); - - if ( (Tangente_X!=Pinceau_X) || (Tangente_Y!=Pinceau_Y) ) - { - Effacer_curseur(); - if ((Config.Coords_rel) && (Menu_visible)) - { - Num2str(Distance(Centre_X,Centre_Y,Pinceau_X,Pinceau_Y),Chaine,4); - Print_dans_menu(Chaine,7); - } - else - Print_coordonnees(); - - Cercle_Limite=((Tangente_X-Centre_X)*(Tangente_X-Centre_X))+ - ((Tangente_Y-Centre_Y)*(Tangente_Y-Centre_Y)); - Rayon=sqrt(Cercle_Limite); - Effacer_cercle_vide_Preview(Centre_X,Centre_Y,Rayon); - - Cercle_Limite=((Pinceau_X-Centre_X)*(Pinceau_X-Centre_X))+ - ((Pinceau_Y-Centre_Y)*(Pinceau_Y-Centre_Y)); - Rayon=sqrt(Cercle_Limite); - Tracer_cercle_vide_Preview(Centre_X,Centre_Y,Rayon,Couleur); - - Afficher_curseur(); - } - - Operation_PUSH(Couleur); - Operation_PUSH(Centre_X); - Operation_PUSH(Centre_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Cercle_degrade_0_6(void) -// -// Op‚ration : OPERATION_CERCLE_DEGRADE -// Click Souris: 0 -// Taille_Pile : 6 (Mouse_K, Couleur, X_Centre, Y_Centre, X_Tangente, Y_Tangente) -// -// Souris effac‚e: Oui -// -{ - short Tangente_X; - short Tangente_Y; - short Centre_X; - short Centre_Y; - short Couleur; - short Click; - short Rayon; - - Operation_POP(&Tangente_Y); - Operation_POP(&Tangente_X); - Operation_POP(&Centre_Y); - Operation_POP(&Centre_X); - - Operation_POP(&Couleur); - Operation_POP(&Click); - - if (Click==A_GAUCHE) - { - Operation_PUSH(Click); - Operation_PUSH(Couleur); - - Operation_PUSH(Centre_X); - Operation_PUSH(Centre_Y); - Operation_PUSH(Tangente_X); - Operation_PUSH(Tangente_Y); - - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - - // On change la forme du curseur - Forme_curseur=FORME_CURSEUR_CIBLE_XOR; - - // On affiche une croix XOR au centre du cercle - Courbe_Tracer_croix(Centre_X,Centre_Y); - - if (Menu_visible) - { - if (Config.Coords_rel) - Print_dans_menu("X: Y:",0); - else - Print_dans_menu("X: Y: ",0); - Aff_coords_rel_ou_abs(Centre_X,Centre_Y); - } - } - else - { - Cercle_Limite=((Tangente_X-Centre_X)*(Tangente_X-Centre_X))+ - ((Tangente_Y-Centre_Y)*(Tangente_Y-Centre_Y)); - Rayon=sqrt(Cercle_Limite); - Effacer_cercle_vide_Preview(Centre_X,Centre_Y,Rayon); - - Cacher_pinceau=Cacher_pinceau_avant_operation; - Forme_curseur=FORME_CURSEUR_CIBLE; - - Tracer_cercle_plein(Centre_X,Centre_Y,Rayon,Back_color); - - if ((Config.Coords_rel) && (Menu_visible)) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } - } -} - - -void Cercle_degrade_12_8(void) -// -// Op‚ration : OPERATION_CERCLE_DEGRADE -// Click Souris: 0 -// Taille_Pile : 8 (Mouse_K, Couleur, X_Centre, Y_Centre, X_Tangente, Y_Tangente, Ancien_X, Ancien_Y) -// -// Souris effac‚e: Oui -// -{ - short Tangente_X; - short Tangente_Y; - short Centre_X; - short Centre_Y; - short Couleur; - short Ancien_Mouse_K; - - short Rayon; - - Operation_Taille_pile-=2; // On fait sauter les 2 derniers ‚lts de la pile - Operation_POP(&Tangente_Y); - Operation_POP(&Tangente_X); - Operation_POP(&Centre_Y); - Operation_POP(&Centre_X); - Operation_POP(&Couleur); - Operation_POP(&Ancien_Mouse_K); - - // On efface la croix XOR au centre du cercle - Courbe_Tracer_croix(Centre_X,Centre_Y); - - Cercle_Limite=((Tangente_X-Centre_X)*(Tangente_X-Centre_X))+ - ((Tangente_Y-Centre_Y)*(Tangente_Y-Centre_Y)); - Rayon=sqrt(Cercle_Limite); - Effacer_cercle_vide_Preview(Centre_X,Centre_Y,Rayon); - - Cacher_pinceau=Cacher_pinceau_avant_operation; - Forme_curseur=FORME_CURSEUR_CIBLE; - - if (Mouse_K==Ancien_Mouse_K) - Tracer_cercle_degrade(Centre_X,Centre_Y,Rayon,Pinceau_X,Pinceau_Y); - - Attendre_fin_de_click(); - - if ((Config.Coords_rel) && (Menu_visible)) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } -} - - -void Cercle_ou_ellipse_degrade_0_8(void) -// -// Op‚ration : OPERATION_{CERCLE|ELLIPSE}_DEGRADE -// Click Souris: 0 -// Taille_Pile : 8 -// -// Souris effac‚e: Non -// -{ - short Debut_X; - short Debut_Y; - short Tangente_X; - short Tangente_Y; - short Ancien_X; - short Ancien_Y; - - Operation_POP(&Ancien_Y); - Operation_POP(&Ancien_X); - - if ((Pinceau_X!=Ancien_X) || (Pinceau_Y!=Ancien_Y)) - { - Operation_POP(&Tangente_Y); - Operation_POP(&Tangente_X); - Operation_POP(&Debut_Y); - Operation_POP(&Debut_X); - Aff_coords_rel_ou_abs(Debut_X,Debut_Y); - Operation_PUSH(Debut_X); - Operation_PUSH(Debut_Y); - Operation_PUSH(Tangente_X); - Operation_PUSH(Tangente_Y); - } - - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -////////////////////////////////////////////////// OPERATION_ELLIPSE_DEGRADEE - - -void Ellipse_degradee_12_0(void) -// -// Op‚ration : OPERATION_ELLIPSE_DEGRADEE -// Click Souris: 1 ou 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -{ - byte Couleur; - - Initialiser_debut_operation(); - Backup(); - - Shade_Table=(Mouse_K==A_GAUCHE)?Shade_Table_gauche:Shade_Table_droite; - Couleur=(Mouse_K==A_GAUCHE)?Fore_color:Back_color; - - Cacher_pinceau_avant_operation=Cacher_pinceau; - Cacher_pinceau=1; - - Pixel_figure_Preview(Pinceau_X,Pinceau_Y,Couleur); - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("X:ñ 0 Y:ñ 0",0); - - Operation_PUSH(Mouse_K); - Operation_PUSH(Couleur); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Ellipse_degradee_12_6(void) -// -// Op‚ration : OPERATION_ELLIPSE_DEGRADEE -// Click Souris: 1 ou 2 -// Taille_Pile : 6 (Mouse_K, Couleur, X_Centre, Y_Centre, X_Tangente, Y_Tangente) -// -// Souris effac‚e: Non -// -{ - short Tangente_X; - short Tangente_Y; - short Centre_X; - short Centre_Y; - short Couleur; - short Rayon_horizontal; - short Rayon_vertical; - - Operation_POP(&Tangente_Y); - Operation_POP(&Tangente_X); - Operation_POP(&Centre_Y); - Operation_POP(&Centre_X); - Operation_POP(&Couleur); - - if ( (Tangente_X!=Pinceau_X) || (Tangente_Y!=Pinceau_Y) ) - { - Effacer_curseur(); - Aff_coords_rel_ou_abs(Centre_X,Centre_Y); - - Rayon_horizontal=(Tangente_X>Centre_X)?Tangente_X-Centre_X - :Centre_X-Tangente_X; - Rayon_vertical =(Tangente_Y>Centre_Y)?Tangente_Y-Centre_Y - :Centre_Y-Tangente_Y; - Effacer_ellipse_vide_Preview(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical); - - Rayon_horizontal=(Pinceau_X>Centre_X)?Pinceau_X-Centre_X - :Centre_X-Pinceau_X; - Rayon_vertical =(Pinceau_Y>Centre_Y)?Pinceau_Y-Centre_Y - :Centre_Y-Pinceau_Y; - Tracer_ellipse_vide_Preview(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical,Couleur); - - Afficher_curseur(); - } - - Operation_PUSH(Couleur); - Operation_PUSH(Centre_X); - Operation_PUSH(Centre_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Ellipse_degradee_0_6(void) -// -// Op‚ration : OPERATION_ELLIPSE_DEGRADEE -// Click Souris: 0 -// Taille_Pile : 6 (Mouse_K, Couleur, X_Centre, Y_Centre, X_Tangente, Y_Tangente) -// -// Souris effac‚e: Oui -// -{ - short Tangente_X; - short Tangente_Y; - short Centre_X; - short Centre_Y; - short Couleur; - short Click; - short Rayon; - short Rayon_horizontal; - short Rayon_vertical; - - Operation_POP(&Tangente_Y); - Operation_POP(&Tangente_X); - Operation_POP(&Centre_Y); - Operation_POP(&Centre_X); - - Operation_POP(&Couleur); - Operation_POP(&Click); - - if (Click==A_GAUCHE) - { - Operation_PUSH(Click); - Operation_PUSH(Couleur); - - Operation_PUSH(Centre_X); - Operation_PUSH(Centre_Y); - Operation_PUSH(Tangente_X); - Operation_PUSH(Tangente_Y); - - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - - // On change la forme du curseur - Forme_curseur=FORME_CURSEUR_CIBLE_XOR; - - // On affiche une croix XOR au centre du cercle - Courbe_Tracer_croix(Centre_X,Centre_Y); - - if (Menu_visible) - { - if (Config.Coords_rel) - Print_dans_menu("X: Y:",0); - else - Print_dans_menu("X: Y: ",0); - Aff_coords_rel_ou_abs(Centre_X,Centre_Y); - } - } - else - { - Rayon_horizontal=(Tangente_X>Centre_X)?Tangente_X-Centre_X - :Centre_X-Tangente_X; - Rayon_vertical =(Tangente_Y>Centre_Y)?Tangente_Y-Centre_Y - :Centre_Y-Tangente_Y; - Effacer_ellipse_vide_Preview(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical); - - Cacher_pinceau=Cacher_pinceau_avant_operation; - Forme_curseur=FORME_CURSEUR_CIBLE; - - Tracer_ellipse_pleine(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical,Back_color); - - if ((Config.Coords_rel) && (Menu_visible)) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } - } -} - - -void Ellipse_degradee_12_8(void) -// -// Op‚ration : OPERATION_ELLIPSE_DEGRADEE -// Click Souris: 0 -// Taille_Pile : 8 (Mouse_K, Couleur, X_Centre, Y_Centre, X_Tangente, Y_Tangente, Ancien_X, Ancien_Y) -// -// Souris effac‚e: Oui -// -{ - short Tangente_X; - short Tangente_Y; - short Centre_X; - short Centre_Y; - short Couleur; - short Rayon_horizontal; - short Rayon_vertical; - short Ancien_Mouse_K; - - Operation_Taille_pile-=2; // On fait sauter les 2 derniers ‚lts de la pile - Operation_POP(&Tangente_Y); - Operation_POP(&Tangente_X); - Operation_POP(&Centre_Y); - Operation_POP(&Centre_X); - Operation_POP(&Couleur); - Operation_POP(&Ancien_Mouse_K); - - // On efface la croix XOR au centre de l'ellipse - Courbe_Tracer_croix(Centre_X,Centre_Y); - - Rayon_horizontal=(Tangente_X>Centre_X)?Tangente_X-Centre_X - :Centre_X-Tangente_X; - Rayon_vertical =(Tangente_Y>Centre_Y)?Tangente_Y-Centre_Y - :Centre_Y-Tangente_Y; - Effacer_ellipse_vide_Preview(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical); - - Cacher_pinceau=Cacher_pinceau_avant_operation; - Forme_curseur=FORME_CURSEUR_CIBLE; - - if (Mouse_K==Ancien_Mouse_K) - Tracer_ellipse_degradee(Centre_X,Centre_Y,Rayon_horizontal,Rayon_vertical,Pinceau_X,Pinceau_Y); - - Attendre_fin_de_click(); - - if ((Config.Coords_rel) && (Menu_visible)) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } -} - - -/////////////////////////////////////////////////// OPERATION_LIGNES_CENTREES - - -void Lignes_centrees_12_0(void) -// Op‚ration : OPERATION_LIGNES_CENTREES -// Click Souris: 1 ou 2 -// Taille_Pile : 0 -// -// Souris effac‚e: Oui -{ - Initialiser_debut_operation(); - Backup(); - Shade_Table=(Mouse_K==A_GAUCHE)?Shade_Table_gauche:Shade_Table_droite; - - if ((Config.Coords_rel) && (Menu_visible)) - Print_dans_menu("X:ñ 0 Y:ñ 0",0); - - Operation_PUSH(Mouse_K); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Lignes_centrees_12_3(void) -// Op‚ration : OPERATION_LIGNES_CENTREES -// Click Souris: 1 ou 2 -// Taille_Pile : 3 -// -// Souris effac‚e: Non -{ - short Debut_X; - short Debut_Y; - - Operation_POP(&Debut_Y); - Operation_POP(&Debut_X); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - - -void Lignes_centrees_0_3(void) -// Op‚ration : OPERATION_LIGNES_CENTREES -// Click Souris: 0 -// Taille_Pile : 3 -// -// Souris effac‚e: Oui -{ - short Debut_X; - short Debut_Y; - short Bouton; - short Couleur; - - Operation_POP(&Debut_Y); - Operation_POP(&Debut_X); - Operation_POP(&Bouton); - - Couleur=(Bouton==A_GAUCHE)?Fore_color:Back_color; - - Pixel_figure_Preview(Pinceau_X,Pinceau_Y,Couleur); - Pinceau_Forme_avant_operation=Pinceau_Forme; - Pinceau_Forme=FORME_PINCEAU_POINT; - - Operation_PUSH(Bouton); - Operation_PUSH(Pinceau_X); // Nouveau d‚but X - Operation_PUSH(Pinceau_Y); // Nouveau d‚but Y - Operation_PUSH(Pinceau_X); // Nouvelle derniŠre fin X - Operation_PUSH(Pinceau_Y); // Nouvelle derniŠre fin Y - Operation_PUSH(Pinceau_X); // Nouvelle derniŠre position X - Operation_PUSH(Pinceau_Y); // Nouvelle derniŠre position Y -} - - -void Lignes_centrees_12_7(void) -// Op‚ration : OPERATION_LIGNES_CENTREES -// Click Souris: 1 ou 2 -// Taille_Pile : 7 -// -// Souris effac‚e: Non -{ - short Bouton; - short Debut_X; - short Debut_Y; - short Fin_X; - short Fin_Y; - short Dernier_X; - short Dernier_Y; - short Couleur; - - Operation_POP(&Dernier_Y); - Operation_POP(&Dernier_X); - Operation_POP(&Fin_Y); - Operation_POP(&Fin_X); - Operation_POP(&Debut_Y); - Operation_POP(&Debut_X); - Operation_POP(&Bouton); - - if (Mouse_K==Bouton) - { - if ( (Fin_X!=Pinceau_X) || (Fin_Y!=Pinceau_Y) || - (Dernier_X!=Pinceau_X) || (Dernier_Y!=Pinceau_Y) ) - { - Effacer_curseur(); - - Couleur=(Bouton==A_GAUCHE)?Fore_color:Back_color; - - Pinceau_Forme=Pinceau_Forme_avant_operation; - - Pixel_figure_Preview (Debut_X,Debut_Y,Lit_pixel_dans_ecran_courant(Debut_X,Debut_Y)); - Effacer_ligne_Preview (Debut_X,Debut_Y,Dernier_X,Dernier_Y); - - Smear_Debut=1; - Afficher_pinceau (Debut_X,Debut_Y,Couleur,0); - Tracer_ligne_Definitif(Debut_X,Debut_Y,Pinceau_X,Pinceau_Y,Couleur); - - Pinceau_Forme=FORME_PINCEAU_POINT; - Pixel_figure_Preview(Pinceau_X,Pinceau_Y,Couleur); - Tracer_ligne_Preview(Debut_X,Debut_Y,Pinceau_X,Pinceau_Y,Couleur); - - Afficher_curseur(); - } - - Operation_PUSH(Bouton); - Operation_PUSH(Debut_X); - Operation_PUSH(Debut_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); - } - else - { - Effacer_curseur(); - - Pinceau_Forme=Pinceau_Forme_avant_operation; - - Pixel_figure_Preview (Debut_X,Debut_Y,Lit_pixel_dans_ecran_courant(Debut_X,Debut_Y)); - Effacer_ligne_Preview (Debut_X,Debut_Y,Dernier_X,Dernier_Y); - - if ( (Config.Coords_rel) && (Menu_visible) ) - { - Print_dans_menu("X: Y: ",0); - Print_coordonnees(); - } - - Afficher_curseur(); - - Attendre_fin_de_click(); - } -} - - -void Lignes_centrees_0_7(void) -// Op‚ration : OPERATION_LIGNES_CENTREES -// Click Souris: 0 -// Taille_Pile : 7 -// -// Souris effac‚e: Non -{ - short Bouton; - short Debut_X; - short Debut_Y; - short Fin_X; - short Fin_Y; - short Dernier_X; - short Dernier_Y; - short Couleur; - - Operation_POP(&Dernier_Y); - Operation_POP(&Dernier_X); - Operation_POP(&Fin_Y); - Operation_POP(&Fin_X); - - if ((Pinceau_X!=Dernier_X) || (Pinceau_Y!=Dernier_Y)) - { - Effacer_curseur(); - Operation_POP(&Debut_Y); - Operation_POP(&Debut_X); - Operation_POP(&Bouton); - - Couleur=(Bouton==A_GAUCHE)?Fore_color:Back_color; - - Aff_coords_rel_ou_abs(Debut_X,Debut_Y); - - Effacer_ligne_Preview(Debut_X,Debut_Y,Dernier_X,Dernier_Y); - - Pixel_figure_Preview(Debut_X,Debut_Y,Couleur); - Tracer_ligne_Preview(Debut_X,Debut_Y,Pinceau_X,Pinceau_Y,Couleur); - - Operation_PUSH(Bouton); - Operation_PUSH(Debut_X); - Operation_PUSH(Debut_Y); - Afficher_curseur(); - } - - Operation_PUSH(Fin_X); - Operation_PUSH(Fin_Y); - Operation_PUSH(Pinceau_X); - Operation_PUSH(Pinceau_Y); -} - -