From 3d76ba0472a1b914e68e72ebb99ecb13a886c5d0 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 19 Jul 2008 01:36:12 +0000 Subject: Fix background image redraw for scales other than 100%. svn path=/trunk/netsurf/; revision=4701 --- render/html_redraw.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/render/html_redraw.c b/render/html_redraw.c index 6eea21bb6..9edb5cbb7 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -1328,16 +1328,19 @@ bool html_redraw_background(int x, int y, struct box *box, float scale, if (!repeat_x) { if (clip_x0 < x) clip_x0 = x; - if (clip_x1 > x + background->background->width) + if (clip_x1 > x + + background->background->width * + scale) clip_x1 = x + background->background-> - width; + width * scale; } else if (!repeat_y) { if (clip_y0 < y) clip_y0 = y; - if (clip_y1 > y + background->background-> - height) + if (clip_y1 > y + + background->background->height * + scale) clip_y1 = y + background->background-> - height; + height * scale; } /* valid clipping rectangles only */ if ((clip_x0 < clip_x1) && (clip_y0 < clip_y1)) { -- cgit v1.2.3