From 8813181cea3228d4f48aef70e4063ab7d2e9abf4 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 19 Feb 2011 22:24:36 +0000 Subject: Use core's thumbnail_redraw(). svn path=/trunk/netsurf/; revision=11717 --- gtk/thumbnail.c | 18 +++--------------- 1 file 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, -- cgit v1.2.3