From dc9861b386b192cceb4ad9ba99e163222155e6d6 Mon Sep 17 00:00:00 2001 From: villa Date: Fri, 19 Jan 1996 11:50:03 +0000 Subject: [PATCH] Corretto scrolling bitmaps git-svn-id: svn://10.65.10.50/trunk@2474 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/viswin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/viswin.cpp b/include/viswin.cpp index dd800af77..1cc5deef9 100755 --- a/include/viswin.cpp +++ b/include/viswin.cpp @@ -807,7 +807,7 @@ void TViswin::paint_background( 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 < width) { @@ -815,8 +815,10 @@ void TViswin::paint_background( PNT p; p.h = delta; p.v = taby(y1); RCT src; xvt_rect_set(&src, p.h, p.v, width, min(p.v+taby(1)+scroll , 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); i->draw(win(), dst, src); }