Contour fill (issue 90), 4th mode of continuous drawing.
However, there is a rendering problem from the original polygon tool: the bottom pixels are not drawn. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@581 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
778d2fccde
commit
4349fd71a3
@ -1687,7 +1687,7 @@ void Bouton_Dessin_Switch_mode(void)
|
|||||||
{
|
{
|
||||||
/* ANCIEN CODE SANS POPUPS */
|
/* ANCIEN CODE SANS POPUPS */
|
||||||
Mode_de_dessin_en_cours++;
|
Mode_de_dessin_en_cours++;
|
||||||
if (Mode_de_dessin_en_cours>OPERATION_DESSIN_POINT)
|
if (Mode_de_dessin_en_cours>OPERATION_FILLED_CONTOUR)
|
||||||
Mode_de_dessin_en_cours=OPERATION_DESSIN_CONTINU;
|
Mode_de_dessin_en_cours=OPERATION_DESSIN_CONTINU;
|
||||||
|
|
||||||
Effacer_curseur();
|
Effacer_curseur();
|
||||||
@ -1711,7 +1711,7 @@ void Bouton_Dessin_Switch_mode(void)
|
|||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
Mode_de_dessin_en_cours++;
|
Mode_de_dessin_en_cours++;
|
||||||
if (Mode_de_dessin_en_cours>OPERATION_DESSIN_POINT)
|
if (Mode_de_dessin_en_cours>OPERATION_FILLED_CONTOUR)
|
||||||
Mode_de_dessin_en_cours=OPERATION_DESSIN_CONTINU;
|
Mode_de_dessin_en_cours=OPERATION_DESSIN_CONTINU;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
1
const.h
1
const.h
@ -375,6 +375,7 @@ enum OPERATIONS
|
|||||||
OPERATION_DESSIN_CONTINU, // Dessin à la main continu
|
OPERATION_DESSIN_CONTINU, // Dessin à la main continu
|
||||||
OPERATION_DESSIN_DISCONTINU, // Dessin à la main discontinu
|
OPERATION_DESSIN_DISCONTINU, // Dessin à la main discontinu
|
||||||
OPERATION_DESSIN_POINT, // Dessin à la main point par point
|
OPERATION_DESSIN_POINT, // Dessin à la main point par point
|
||||||
|
OPERATION_FILLED_CONTOUR, // Contour rempli
|
||||||
OPERATION_LIGNE, // Lignes
|
OPERATION_LIGNE, // Lignes
|
||||||
OPERATION_K_LIGNE, // Lignes reliées
|
OPERATION_K_LIGNE, // Lignes reliées
|
||||||
OPERATION_LIGNES_CENTREES, // Lignes concentriques
|
OPERATION_LIGNES_CENTREES, // Lignes concentriques
|
||||||
|
|||||||
11
init.c
11
init.c
@ -1534,6 +1534,17 @@ void Initialisation_des_operations(void)
|
|||||||
Initialiser_operation(OPERATION_FILLED_POLYFORM,0,8,
|
Initialiser_operation(OPERATION_FILLED_POLYFORM,0,8,
|
||||||
Filled_polyform_0_8,0);
|
Filled_polyform_0_8,0);
|
||||||
|
|
||||||
|
Initialiser_operation(OPERATION_FILLED_CONTOUR,1,0,
|
||||||
|
Filled_polyform_12_0,1);
|
||||||
|
Initialiser_operation(OPERATION_FILLED_CONTOUR,2,0,
|
||||||
|
Filled_polyform_12_0,1);
|
||||||
|
Initialiser_operation(OPERATION_FILLED_CONTOUR,1,8,
|
||||||
|
Filled_polyform_12_8,0);
|
||||||
|
Initialiser_operation(OPERATION_FILLED_CONTOUR,2,8,
|
||||||
|
Filled_polyform_12_8,0);
|
||||||
|
Initialiser_operation(OPERATION_FILLED_CONTOUR,0,8,
|
||||||
|
Filled_contour_0_8,0);
|
||||||
|
|
||||||
Initialiser_operation(OPERATION_SCROLL,1,0,
|
Initialiser_operation(OPERATION_SCROLL,1,0,
|
||||||
Scroll_12_0,1);
|
Scroll_12_0,1);
|
||||||
Initialiser_operation(OPERATION_SCROLL,2,0,
|
Initialiser_operation(OPERATION_SCROLL,2,0,
|
||||||
|
|||||||
40
operatio.c
40
operatio.c
@ -2740,6 +2740,46 @@ void Filled_polyform_0_8(void)
|
|||||||
Operation_PUSH(Clic);
|
Operation_PUSH(Clic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Filled_contour_0_8(void)
|
||||||
|
// Opération : OPERATION_FILLED_CONTOUR
|
||||||
|
// Click Souris: 0
|
||||||
|
// Taille_Pile : 8
|
||||||
|
//
|
||||||
|
// Souris effacée: Non
|
||||||
|
{
|
||||||
|
short Clic;
|
||||||
|
short Fin_Y;
|
||||||
|
short Fin_X;
|
||||||
|
short Debut_Y;
|
||||||
|
short Debut_X;
|
||||||
|
short Couleur;
|
||||||
|
short Initial_Y;
|
||||||
|
short Initial_X;
|
||||||
|
|
||||||
|
Operation_POP(&Clic);
|
||||||
|
Operation_POP(&Fin_Y);
|
||||||
|
Operation_POP(&Fin_X);
|
||||||
|
Operation_POP(&Debut_Y);
|
||||||
|
Operation_POP(&Debut_X);
|
||||||
|
Operation_POP(&Couleur);
|
||||||
|
Operation_POP(&Initial_Y);
|
||||||
|
Operation_POP(&Initial_X);
|
||||||
|
|
||||||
|
Attendre_fin_de_click();
|
||||||
|
Effacer_curseur();
|
||||||
|
Print_coordonnees();
|
||||||
|
|
||||||
|
// Pas besoin d'effacer la ligne (Debut_X,Debut_Y)-(Fin_X,Fin_Y)
|
||||||
|
// puisque on les effaces toutes d'un coup.
|
||||||
|
|
||||||
|
Afficher_ecran();
|
||||||
|
Polyfill(Polyfill_Nombre_de_points,Polyfill_Table_de_points,Couleur);
|
||||||
|
free(Polyfill_Table_de_points);
|
||||||
|
|
||||||
|
Cacher_pinceau=0;
|
||||||
|
|
||||||
|
Afficher_curseur();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////// OPERATION_PRISE_BROSSE
|
////////////////////////////////////////////////////// OPERATION_PRISE_BROSSE
|
||||||
|
|
||||||
|
|||||||
@ -159,6 +159,7 @@ void Polyform_0_8(void);
|
|||||||
void Filled_polyform_12_0(void);
|
void Filled_polyform_12_0(void);
|
||||||
void Filled_polyform_12_8(void);
|
void Filled_polyform_12_8(void);
|
||||||
void Filled_polyform_0_8(void);
|
void Filled_polyform_0_8(void);
|
||||||
|
void Filled_contour_0_8(void);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////// OPERATION_SCROLL
|
//////////////////////////////////////////////////////////// OPERATION_SCROLL
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user