summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-10-19 21:16:12 +0000
committerJames Bursa <james@netsurf-browser.org>2004-10-19 21:16:12 +0000
commit4ba346daa8b1b88a599c556b53f1c7e31ec51d7f (patch)
treeef3399003d1fafbcbdb42c50f30c79b0387a61d8
parente215fc6136d154aa5faf1cc44dffbb88a41dffc7 (diff)
downloadnetsurf-4ba346daa8b1b88a599c556b53f1c7e31ec51d7f.tar.gz
netsurf-4ba346daa8b1b88a599c556b53f1c7e31ec51d7f.tar.bz2
[project @ 2004-10-19 21:16:12 by bursa]
Update to use plotters. svn path=/import/netsurf/; revision=1325
-rw-r--r--riscos/thumbnail.c25
1 files changed, 20 insertions, 5 deletions
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);
}
}