summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-07-19 01:36:12 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-07-19 01:36:12 +0000
commit3d76ba0472a1b914e68e72ebb99ecb13a886c5d0 (patch)
treeb533ffabd3960fbb0db3f30aab59dc074a4f1876 /render
parent302e16de79f986bb331f24343b8ba9f0859f56c4 (diff)
downloadnetsurf-3d76ba0472a1b914e68e72ebb99ecb13a886c5d0.tar.gz
netsurf-3d76ba0472a1b914e68e72ebb99ecb13a886c5d0.tar.bz2
Fix background image redraw for scales other than 100%.
svn path=/trunk/netsurf/; revision=4701
Diffstat (limited to 'render')
-rw-r--r--render/html_redraw.c13
1 files 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)) {