summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-02-13 22:25:11 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-02-13 22:25:11 +0000
commitfe7921a387c5a71c8ecba7bb605679b7dab4b86f (patch)
treed31c249671b3e71f498dd48b6c42b56f1e278f7f /gtk
parentdb2f823e9990cee17b1072ce2296ef88062bc7bd (diff)
downloadnetsurf-fe7921a387c5a71c8ecba7bb605679b7dab4b86f.tar.gz
netsurf-fe7921a387c5a71c8ecba7bb605679b7dab4b86f.tar.bz2
Pass clip rect as struct through content_redraw api. Update the front ends to use this. Note only RO build tested.
svn path=/trunk/netsurf/; revision=11670
Diffstat (limited to 'gtk')
-rw-r--r--gtk/thumbnail.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/thumbnail.c b/gtk/thumbnail.c
index 53d62fe30..f0a25ce30 100644
--- a/gtk/thumbnail.c
+++ b/gtk/thumbnail.c
@@ -51,6 +51,7 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
{
GdkPixbuf *pixbuf;
int cwidth, cheight;
+ struct rect clip;
gint width;
gint height;
gint depth;
@@ -60,6 +61,11 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
assert(content);
assert(bitmap);
+ clip.x0 = 0;
+ clip.y0 = 0;
+ clip.x1 = content_get_width(content);
+ clip.y1 = content_get_width(content);
+
cwidth = min(content_get_width(content), 1024);
cheight = min(content_get_height(content), 768);
@@ -100,13 +106,12 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
#endif
plot.rectangle(0, 0, cwidth, cwidth, plot_style_fill_white);
- plot.clip(0, 0, content_get_width(content), content_get_width(content));
+ plot.clip(clip.x0, clip.y0, clip.x1, clip.y1);
/* render the content */
content_redraw(content, 0, 0, content_get_width(content),
content_get_width(content),
- 0, 0, content_get_width(content),
- content_get_width(content), 1.0, 0xFFFFFF);
+ &clip, 1.0, 0xFFFFFF);
/* resample the large plot down to the size of our thumbnail */
big = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL, 0, 0, 0, 0,