From 4ba346daa8b1b88a599c556b53f1c7e31ec51d7f Mon Sep 17 00:00:00 2001 From: James Bursa Date: Tue, 19 Oct 2004 21:16:12 +0000 Subject: [project @ 2004-10-19 21:16:12 by bursa] Update to use plotters. svn path=/import/netsurf/; revision=1325 --- riscos/thumbnail.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'riscos/thumbnail.c') diff --git a/riscos/thumbnail.c b/riscos/thumbnail.c index 2c0953113..763a7b57f 100644 --- a/riscos/thumbnail.c +++ b/riscos/thumbnail.c @@ -19,6 +19,8 @@ #include "oslib/osfile.h" #include "oslib/osspriteop.h" #include "netsurf/content/content.h" +#include "netsurf/desktop/plotters.h" +#include "netsurf/riscos/gui.h" #include "netsurf/riscos/options.h" #include "netsurf/riscos/thumbnail.h" #include "netsurf/riscos/tinct.h" @@ -99,13 +101,20 @@ void thumbnail_create(struct content *content, osspriteop_area *area, */ scale = (float) width / (float) content->width; + /* Set up plotters + */ + plot = ro_plotters; + ro_plot_origin_x = 0; + ro_plot_origin_y = height * 2; + ro_plot_set_scale(scale); + /* Switch output and redraw oversampled */ save_area = thumbnail_switch_output(oversampled_area, (osspriteop_header *)(oversampled_area + 1)); if (save_area == NULL) return; - content_redraw(content, 0, height * 2, width * 2, height * 2, - 0, 0, width * 2, height * 2, scale, 0xFFFFFF); + content_redraw(content, 0, 0, width, height, + 0, 0, width, height, scale, 0xFFFFFF); thumbnail_restore_output(save_area); /* Scale back @@ -142,7 +151,13 @@ void thumbnail_create(struct content *content, osspriteop_area *area, scale = (float) width / (float) content->width; else scale = 1.0; - LOG(("Scaling to %f and outputting at %ix%i", scale, width, height)); + + /* Set up plotters + */ + plot = ro_plotters; + ro_plot_origin_x = 0; + ro_plot_origin_y = height * 2; + ro_plot_set_scale(scale); /* Switch output and redraw */ @@ -151,8 +166,8 @@ void thumbnail_create(struct content *content, osspriteop_area *area, colourtrans_set_gcol(os_COLOUR_WHITE, colourtrans_SET_BG, os_ACTION_OVERWRITE, 0); os_clg(); - content_redraw(content, 0, height * 2, width * 2, height * 2, - 0, 0, width * 2, height * 2, scale, 0xFFFFFF); + content_redraw(content, 0, 0, width, height, + 0, 0, width, height, scale, 0xFFFFFF); thumbnail_restore_output(save_area); } } -- cgit v1.2.3