diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-02-19 22:24:36 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-02-19 22:24:36 +0000 |
commit | 8813181cea3228d4f48aef70e4063ab7d2e9abf4 (patch) | |
tree | 349686e0e059452628bb41721884cc93b9293eff /gtk | |
parent | a66575dfebd6460d5134c22543458030c7ae817d (diff) | |
download | netsurf-8813181cea3228d4f48aef70e4063ab7d2e9abf4.tar.gz netsurf-8813181cea3228d4f48aef70e4063ab7d2e9abf4.tar.bz2 |
Use core's thumbnail_redraw().
svn path=/trunk/netsurf/; revision=11717
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/thumbnail.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/gtk/thumbnail.c b/gtk/thumbnail.c index 2523919e6..74058798b 100644 --- a/gtk/thumbnail.c +++ b/gtk/thumbnail.c @@ -52,7 +52,6 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, { GdkPixbuf *pixbuf; int cwidth, cheight; - struct rect clip; gint width; gint height; gint depth; @@ -98,7 +97,8 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, /* set the plotting functions up */ plot = nsgtk_plotters; - plot_scale = (float)cwidth / (float)content_get_width(content); + /* Plotters need to know thumbnail scale */ + plot_scale = thumbnail_get_redraw_scale(content, cwidth); nsgtk_plot_set_scale(plot_scale); /* set to plot to pixmap */ @@ -108,20 +108,8 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, current_cr = gdk_cairo_create(current_drawable); #endif - /* Set up clip rect */ - clip.x0 = 0; - clip.y0 = 0; - clip.x1 = cwidth; - clip.y1 = cheight; - - plot.clip(&clip); - - /* blank the background */ - plot.rectangle(0, 0, cwidth, cheight, plot_style_fill_white); - /* render the content */ - content_redraw(content, 0, 0, cwidth, cheight, - &clip, plot_scale, 0xFFFFFF); + thumbnail_redraw(content, cwidth, cheight); /* get the pixbuf we rendered the content into */ big = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL, 0, 0, 0, 0, |