Fix background image redraw for scales other than 100%.

svn path=/trunk/netsurf/; revision=4701
This commit is contained in:
Michael Drake 2008-07-19 01:36:12 +00:00
parent 302e16de79
commit 3d76ba0472

View File

@ -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)) {