Corretto scrolling bitmaps

git-svn-id: svn://10.65.10.50/trunk@2474 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1996-01-19 11:50:03 +00:00
parent 061974bc79
commit dc9861b386

View File

@ -807,7 +807,7 @@ void TViswin::paint_background(
if (i && i->ok()) if (i && i->ok())
{ {
short delta = tabx(short(origin().x-x1)); // Primo pixel sorgente short delta = tabx(short(origin().x-x1-X_OFFSET)); // Primo pixel sorgente
if (delta < 0) delta = 0; if (delta < 0) delta = 0;
if (delta < width) if (delta < width)
{ {
@ -816,7 +816,9 @@ void TViswin::paint_background(
RCT src; xvt_rect_set(&src, p.h, p.v, width, min(p.v+taby(1)+scroll , i->height())); RCT src; xvt_rect_set(&src, p.h, p.v, width, min(p.v+taby(1)+scroll , i->height()));
if (src.top < i->height()) if (src.top < i->height())
{ {
p.h = tabx(short(x1-origin().x+X_OFFSET)); p.v = taby(row); short px = short(x1-origin().x+X_OFFSET);
if (px < X_OFFSET) px = X_OFFSET;
p.h = tabx(px); p.v = taby(row);
RCT dst = src; xvt_rect_set_pos(&dst, p); RCT dst = src; xvt_rect_set_pos(&dst, p);
i->draw(win(), dst, src); i->draw(win(), dst, src);
} }