Corretto scrolling orizzontale background
git-svn-id: svn://10.65.10.50/trunk@2439 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1b0596fb89
commit
04c9d7c1ae
@ -707,6 +707,10 @@ void TViswin::paint_background (
|
||||
PNT b, e;
|
||||
int cnt = 0;
|
||||
char ch;
|
||||
|
||||
bool isbeg = FALSE;
|
||||
bool isend = FALSE;
|
||||
|
||||
while ((ch = rwd[cnt++]) != '\0')
|
||||
{
|
||||
switch (ch)
|
||||
@ -763,14 +767,18 @@ void TViswin::paint_background (
|
||||
case 'r': // orizzontale scorciata agli estremi
|
||||
x1 = (byte) rwd[cnt++];
|
||||
x2 = (byte) rwd[cnt++];
|
||||
isbeg = ox <= (x1-1);
|
||||
isend = mx >= (x2-1);
|
||||
if (x1 <= mx && x2 >= ox)
|
||||
{
|
||||
x1 += (X_OFFSET -1) - ox;
|
||||
if (x1 < X_OFFSET) x1 = X_OFFSET;
|
||||
x2 += (X_OFFSET -1) - ox;
|
||||
b.v = e.v = taby(2*row+1) / 2;
|
||||
b.h = tabx(2*x1+1) / 2;
|
||||
e.h = tabx(2*x2+1) / 2;
|
||||
if (isbeg) b.h = tabx(2*x1+1) / 2;
|
||||
else b.h = tabx(x1);
|
||||
if (isend) e.h = tabx(2*x2+1) / 2;
|
||||
else e.h = tabx(x2 +1);
|
||||
xvt_dwin_draw_set_pos(win(), b);
|
||||
xvt_dwin_draw_line(win(), e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user