summaryrefslogtreecommitdiff
path: root/amiga/gui.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-08-31 12:05:35 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-08-31 12:05:35 +0000
commit057bbb634f7e9991449719124d0af08a05203452 (patch)
treeb568ddfb0c0af7f5119f0c02cdf5b34d5811fd6c /amiga/gui.c
parent5a4897d72256ebf23a05aafbba10f104036d63e3 (diff)
downloadnetsurf-057bbb634f7e9991449719124d0af08a05203452.tar.gz
netsurf-057bbb634f7e9991449719124d0af08a05203452.tar.bz2
Fix box redraw when scaled, fast scrolling now works in the upwards direction, but
not down :) svn path=/trunk/netsurf/; revision=9522
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-xamiga/gui.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 68a56a592..82460f2fc 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2397,11 +2397,19 @@ void ami_do_redraw_limits(struct gui_window *g, struct content *c,int x0, int y0
current_redraw_browser = g->shared->bw;
- width=bbox->Width;
- height=bbox->Height;
+ width=bbox->Width / g->shared->bw->scale;
+ height=bbox->Height / g->shared->bw->scale;
xoffset=bbox->Left;
yoffset=bbox->Top;
+/* x0 *= g->shared->bw->scale;
+ x1 *= g->shared->bw->scale;
+ y0 *= g->shared->bw->scale;
+ y1 *= g->shared->bw->scale;
+
+ sx *= g->shared->bw->scale;
+ sy *= g->shared->bw->scale;
+*/
plot=amiplot;
glob = &browserglob;
@@ -2417,15 +2425,13 @@ void ami_do_redraw_limits(struct gui_window *g, struct content *c,int x0, int y0
glob->scale = g->shared->bw->scale;
content_redraw(c,
- -sx,-sy,width-sx,height-sy,
- floorf((x0 *
- g->shared->bw->scale)-sx),
- ceilf((y0 *
- g->shared->bw->scale)-sy),
- (x1 *
- g->shared->bw->scale)-sx,
- (y1 *
- g->shared->bw->scale)-sy,
+ -sx, -sy,
+ width - sx,
+ height - sy,
+ (x0 - sx) * g->shared->bw->scale,
+ (y0 - sy) * g->shared->bw->scale,
+ (x1 - sx) * g->shared->bw->scale,
+ (y1 - sy) * g->shared->bw->scale,
g->shared->bw->scale,
0xFFFFFF);
@@ -2433,8 +2439,15 @@ void ami_do_redraw_limits(struct gui_window *g, struct content *c,int x0, int y0
ami_clearclipreg(&browserglob);
- BltBitMapRastPort(browserglob.bm,x0-sx,y0-sy,g->shared->win->RPort,
- xoffset+x0-sx,yoffset+y0-sy,x1-x0,y1-y0,0x0C0);
+ BltBitMapRastPort(browserglob.bm,
+ (x0 - sx) * g->shared->bw->scale,
+ (y0 - sy) * g->shared->bw->scale,
+ g->shared->win->RPort,
+ xoffset + ((x0 - sx) * g->shared->bw->scale),
+ yoffset + ((y0 - sy) * g->shared->bw->scale),
+ (x1 - x0) * g->shared->bw->scale,
+ (y1 - y0) * g->shared->bw->scale,
+ 0x0C0);
}
void gui_window_redraw(struct gui_window *g, int x0, int y0, int x1, int y1)