From b46e69fe2297480183364fb87bf195267652629b Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 9 Mar 2011 16:20:55 +0000 Subject: Purge ro_plot_set_scale() and ro_plot_scale global, as front ends nolonger need to maintain scale for plotting. svn path=/trunk/netsurf/; revision=11942 --- riscos/debugwin.c | 1 - riscos/gui.h | 1 - riscos/gui/progress_bar.c | 1 - riscos/gui/status_bar.c | 1 - riscos/history.c | 1 - riscos/plotters.c | 10 ---------- riscos/print.c | 1 - riscos/thumbnail.c | 2 -- riscos/toolbar.c | 1 - riscos/treeview.c | 6 ------ riscos/window.c | 3 --- 11 files changed, 28 deletions(-) diff --git a/riscos/debugwin.c b/riscos/debugwin.c index c32731a71..ffbdec483 100644 --- a/riscos/debugwin.c +++ b/riscos/debugwin.c @@ -141,7 +141,6 @@ void ro_gui_debugwin_redraw(wimp_draw *redraw) /* Select RISC OS plotters */ plot = ro_plotters; - ro_plot_set_scale(1.0); error = xwimp_redraw_window(redraw, &more); if (error) { diff --git a/riscos/gui.h b/riscos/gui.h index 3a8566672..dcfb6a0ce 100644 --- a/riscos/gui.h +++ b/riscos/gui.h @@ -205,7 +205,6 @@ void ro_gui_wimp_get_desktop_font(void); extern const struct plotter_table ro_plotters; extern int ro_plot_origin_x; extern int ro_plot_origin_y; -void ro_plot_set_scale(float scale); /* in theme_install.c */ bool ro_gui_theme_install_apply(wimp_w w); diff --git a/riscos/gui/progress_bar.c b/riscos/gui/progress_bar.c index 5c90195ad..b53fbf225 100644 --- a/riscos/gui/progress_bar.c +++ b/riscos/gui/progress_bar.c @@ -473,7 +473,6 @@ void ro_gui_progress_bar_redraw_window(wimp_draw *redraw, /* initialise the plotters */ plot = ro_plotters; - ro_plot_set_scale(1.0); ro_plot_origin_x = 0; ro_plot_origin_y = 0; diff --git a/riscos/gui/status_bar.c b/riscos/gui/status_bar.c index c28611146..d47bf8e97 100644 --- a/riscos/gui/status_bar.c +++ b/riscos/gui/status_bar.c @@ -449,7 +449,6 @@ void ro_gui_status_bar_redraw(wimp_draw *redraw) /* initialise the plotters */ plot = ro_plotters; - ro_plot_set_scale(1.0); ro_plot_origin_x = 0; ro_plot_origin_y = 0; diff --git a/riscos/history.c b/riscos/history.c index 6157727c7..93cd65ab7 100644 --- a/riscos/history.c +++ b/riscos/history.c @@ -141,7 +141,6 @@ void ro_gui_history_redraw(wimp_draw *redraw) os_error *error; plot = ro_plotters; - ro_plot_set_scale(1.0); error = xwimp_redraw_window(redraw, &more); if (error) { diff --git a/riscos/plotters.c b/riscos/plotters.c index 4d20910b4..966b6cb68 100644 --- a/riscos/plotters.c +++ b/riscos/plotters.c @@ -69,7 +69,6 @@ const struct plotter_table ro_plotters = { int ro_plot_origin_x = 0; int ro_plot_origin_y = 0; -float ro_plot_scale = 1.0; /** One version of the A9home OS is incapable of drawing patterned lines */ bool ro_plot_patterned_lines = true; @@ -537,12 +536,3 @@ bool ro_plot_bitmap(int x, int y, int width, int height, bitmap_get_opaque(bitmap) ? IMAGE_PLOT_TINCT_OPAQUE : IMAGE_PLOT_TINCT_ALPHA); } - -/** - * Set the scale for subsequent text plotting. - */ - -void ro_plot_set_scale(float scale) -{ - ro_plot_scale = scale; -} diff --git a/riscos/print.c b/riscos/print.c index 807b12eeb..a1e940f4d 100644 --- a/riscos/print.c +++ b/riscos/print.c @@ -625,7 +625,6 @@ bool print_document(struct gui_window *g, const char *filename) plot = ro_plotters; plot.option_knockout = false; - ro_plot_set_scale(print_scale); ro_gui_current_redraw_gui = g; current_redraw_browser = NULL; /* we don't want to print the selection */ diff --git a/riscos/thumbnail.c b/riscos/thumbnail.c index 9229ebd2e..3bc25f335 100644 --- a/riscos/thumbnail.c +++ b/riscos/thumbnail.c @@ -117,8 +117,6 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, if (content_get_width(content)) scale = thumbnail_get_redraw_scale(content, bitmap->width); - ro_plot_set_scale(scale); - /* switch output and redraw */ save_area = thumbnail_switch_output(sprite_area, sprite_header); if (!save_area) { diff --git a/riscos/toolbar.c b/riscos/toolbar.c index 222a20586..263ba050c 100644 --- a/riscos/toolbar.c +++ b/riscos/toolbar.c @@ -1012,7 +1012,6 @@ void ro_toolbar_redraw(wimp_draw *redraw) assert(toolbar != NULL); plot = ro_plotters; - ro_plot_set_scale(1.0); error = xwimp_redraw_window(redraw, &more); if (error) { diff --git a/riscos/treeview.c b/riscos/treeview.c index 78bf9f0b4..f96f761d6 100644 --- a/riscos/treeview.c +++ b/riscos/treeview.c @@ -317,10 +317,7 @@ void ro_treeview_redraw_request(int x, int y, int width, int height, wimp_draw update; osbool more; - /* The scale can't be changed; it's always 1:1. */ - plot = ro_plotters; - ro_plot_set_scale(1.0); update.w = tv->w; update.box.x0 = (2 * x) + tv->origin.x; @@ -360,10 +357,7 @@ void ro_treeview_redraw(wimp_draw *redraw) */ } - /* The scale can't be changed; it's always 1:1. */ - plot = ro_plotters; - ro_plot_set_scale(1.0); error = xwimp_redraw_window(redraw, &more); if (error) { diff --git a/riscos/window.c b/riscos/window.c index 2e07b8390..7c2328d38 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1677,7 +1677,6 @@ void ro_gui_window_redraw(wimp_draw *redraw) { osbool more; struct gui_window *g = (struct gui_window *)ro_gui_wimp_event_get_user_data(redraw->w); - float scale = g->bw->scale; os_error *error; /* We can't render locked contents. If the browser window is not @@ -1687,7 +1686,6 @@ void ro_gui_window_redraw(wimp_draw *redraw) return; plot = ro_plotters; - ro_plot_set_scale(scale); ro_gui_current_redraw_gui = g; current_redraw_browser = g->bw; @@ -4390,7 +4388,6 @@ void ro_gui_window_update_boxes(void) plot = ro_plotters; ro_plot_origin_x = update.box.x0 - update.xscroll; ro_plot_origin_y = update.box.y1 - update.yscroll; - ro_plot_set_scale(g->bw->scale); while (more) { clip.x0 = (update.clip.x0 - ro_plot_origin_x) / 2; -- cgit v1.2.3