diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2006-07-01 18:41:33 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2006-07-01 18:41:33 +0000 |
commit | 2dc65ac4149695daac5adf3ab24fff5625067d68 (patch) | |
tree | cdb8bb45b121f3134fc1f8e24f420c4194663f16 /desktop/knockout.c | |
parent | cf4294d3a85518a6502ce63a58c0b05d5baab949 (diff) | |
download | netsurf-2dc65ac4149695daac5adf3ab24fff5625067d68.tar.gz |
Don't assume tiled plotting will cover the entire clipping region.
svn path=/trunk/netsurf/; revision=2683
Diffstat (limited to 'desktop/knockout.c')
-rw-r--r-- | desktop/knockout.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/desktop/knockout.c b/desktop/knockout.c index 89ef58bc3..478a5b114 100644 --- a/desktop/knockout.c +++ b/desktop/knockout.c @@ -720,9 +720,20 @@ bool knockout_plot_bitmap_tile(int x, int y, int width, int height, bool repeat_x, bool repeat_y) { /* tiled bitmaps both knock out and get knocked out */ - if (bitmap_get_opaque(bitmap)) - knockout_calculate(clip_x0_cur, clip_y0_cur, clip_x1_cur, clip_y1_cur, - knockout_list); + if (bitmap_get_opaque(bitmap)) { + if ((repeat_x && repeat_y) || + /* horizontally repeating, full height */ + (repeat_x && (y <= clip_y0_cur) && + (y + height >= clip_y1_cur)) || + /* vertically repeating, full width */ + (repeat_y && (x <= clip_x0_cur) && + (x + width >= clip_x1_cur)) || + /* no repeat, full width & height */ + ((y <= clip_y0_cur) && (y + height >= clip_y1_cur) && + (x <= clip_x0_cur) && (x + width >= clip_x1_cur))) + knockout_calculate(clip_x0_cur, clip_y0_cur, + clip_x1_cur, clip_y1_cur, knockout_list); + } knockout_boxes[knockout_box_cur].bbox.x0 = clip_x0_cur; knockout_boxes[knockout_box_cur].bbox.y0 = clip_y0_cur; knockout_boxes[knockout_box_cur].bbox.x1 = clip_x1_cur; |