diff options
-rw-r--r-- | render/html_redraw.c | 13 |
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)) { |