diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-14 22:14:02 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-14 22:14:02 +0000 |
commit | 2a6b4b79b069cf7f631e619781ba5e1baf50099c (patch) | |
tree | 4518b5622d8b32c95b943aaff95dab8def52ba4a /gtk | |
parent | e761d87f35c54bfa81014f17240b8cf27d846ee6 (diff) | |
download | netsurf-2a6b4b79b069cf7f631e619781ba5e1baf50099c.tar.gz netsurf-2a6b4b79b069cf7f631e619781ba5e1baf50099c.tar.bz2 |
[project @ 2006-03-14 22:14:02 by dsilvers]
Fix anchoring and repeats for gtk repeated bitmaps
svn path=/import/netsurf/; revision=2131
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtk_plotters.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gtk/gtk_plotters.c b/gtk/gtk_plotters.c index c6d157a51..dd0add940 100644 --- a/gtk/gtk_plotters.c +++ b/gtk/gtk_plotters.c @@ -188,17 +188,27 @@ bool nsgtk_plot_bitmap_tile(int x, int y, int width, int height, return nsgtk_plot_bitmap(x,y,width,height,bitmap,bg); } - doneheight = cliprect.y - (cliprect.y % height); + if (y > cliprect.y) + doneheight = (cliprect.y - height) + ((y - cliprect.y) % height); + else + doneheight = y; while (doneheight < (cliprect.y + cliprect.height)) { - donewidth = cliprect.x - (cliprect.x % width); + if (x > cliprect.x) + donewidth = (cliprect.x - width) + ((x - cliprect.x) % width); + else + donewidth = x; while (donewidth < (cliprect.x + cliprect.width)) { nsgtk_plot_bitmap(donewidth, doneheight, width, height, bitmap, bg); donewidth += width; + if (!repeat_x) break; } doneheight += height; - } + if (!repeat_y) break; + } + + return true; } |