Fixed Contour crash when outside limits (issue 119)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@632 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
6c2d55ed8f
commit
0bbd2249ea
15
graph.c
15
graph.c
@ -850,6 +850,16 @@ void Remplir(byte Couleur_de_remplissage)
|
||||
Afficher_pinceau(Pos_X,Pos_Y,Couleur,0);
|
||||
}
|
||||
|
||||
// Affichage d'un point de façon définitive
|
||||
void Pixel_clippe(word Pos_X,word Pos_Y,byte Couleur)
|
||||
{
|
||||
if ( (Pos_X>=Limite_Gauche) &&
|
||||
(Pos_X<=Limite_Droite) &&
|
||||
(Pos_Y>=Limite_Haut) &&
|
||||
(Pos_Y<=Limite_Bas) )
|
||||
Afficher_pixel(Pos_X,Pos_Y,Couleur);
|
||||
}
|
||||
|
||||
// Affichage d'un point pour une preview
|
||||
void Pixel_figure_Preview(word Pos_X,word Pos_Y,byte Couleur)
|
||||
{
|
||||
@ -2204,7 +2214,7 @@ void Polyfill(int Vertices, short * Points, int Color)
|
||||
int Indice;
|
||||
byte *FX_Feedback_Ecran_avant_remplissage;
|
||||
|
||||
Afficher_pixel(Points[0],Points[1],Color);
|
||||
Pixel_clippe(Points[0],Points[1],Color);
|
||||
if (Vertices==1)
|
||||
{
|
||||
Mettre_Ecran_A_Jour(Points[0],Points[1],1,1);
|
||||
@ -2216,7 +2226,7 @@ void Polyfill(int Vertices, short * Points, int Color)
|
||||
FX_Feedback_Ecran_avant_remplissage=FX_Feedback_Ecran;
|
||||
FX_Feedback_Ecran=Ecran_backup;
|
||||
|
||||
Pixel_figure=Afficher_pixel;
|
||||
Pixel_figure=Pixel_clippe;
|
||||
Polyfill_General(Vertices,Points,Color);
|
||||
|
||||
// Remarque: pour dessiner la bordure avec la brosse en cours au lieu
|
||||
@ -2230,6 +2240,7 @@ void Polyfill(int Vertices, short * Points, int Color)
|
||||
|
||||
// restore de l'etat du FX Feedback
|
||||
FX_Feedback_Ecran=FX_Feedback_Ecran_avant_remplissage;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user