summaryrefslogtreecommitdiff
path: root/gtk/thumbnail.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/thumbnail.c')
-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,