(Linux and Windows) Fix missing refresh that happened when zoom was on and you were drawing in the left part of screen.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@411 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
c1af3faac2
commit
7247b83007
14
graph.c
14
graph.c
@ -122,23 +122,37 @@ void Mettre_Ecran_A_Jour(short X, short Y, short Largeur, short Hauteur)
|
|||||||
if (X_effectif < 0)
|
if (X_effectif < 0)
|
||||||
{
|
{
|
||||||
L_effectif+=X_effectif;
|
L_effectif+=X_effectif;
|
||||||
|
if (L_effectif<0)
|
||||||
|
return;
|
||||||
|
|
||||||
X_effectif = Principal_Split + LARGEUR_BARRE_SPLIT*Menu_Facteur_X;
|
X_effectif = Principal_Split + LARGEUR_BARRE_SPLIT*Menu_Facteur_X;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
X_effectif += Principal_Split + LARGEUR_BARRE_SPLIT*Menu_Facteur_X;
|
X_effectif += Principal_Split + LARGEUR_BARRE_SPLIT*Menu_Facteur_X;
|
||||||
Diff = X_effectif+L_effectif-Largeur_ecran;
|
Diff = X_effectif+L_effectif-Largeur_ecran;
|
||||||
if (Diff>0)
|
if (Diff>0)
|
||||||
|
{
|
||||||
L_effectif -=Diff;
|
L_effectif -=Diff;
|
||||||
|
if (L_effectif<0)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Clipping en Y
|
// Clipping en Y
|
||||||
if (Y_effectif < 0)
|
if (Y_effectif < 0)
|
||||||
{
|
{
|
||||||
H_effectif+=Y_effectif;
|
H_effectif+=Y_effectif;
|
||||||
|
if (H_effectif<0)
|
||||||
|
return;
|
||||||
Y_effectif = 0;
|
Y_effectif = 0;
|
||||||
}
|
}
|
||||||
Diff = Y_effectif+H_effectif-Menu_Ordonnee;
|
Diff = Y_effectif+H_effectif-Menu_Ordonnee;
|
||||||
if (Diff>0)
|
if (Diff>0)
|
||||||
|
{
|
||||||
H_effectif -=Diff;
|
H_effectif -=Diff;
|
||||||
|
if (H_effectif<0)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Très utile pour le debug :)
|
// Très utile pour le debug :)
|
||||||
/*SDL_Rect r;
|
/*SDL_Rect r;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user