summaryrefslogtreecommitdiff
path: root/riscos/plotters.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-02-21 21:31:31 +0000
committerJames Bursa <james@netsurf-browser.org>2005-02-21 21:31:31 +0000
commite9598b10f830ca6b28b44ad418a9081b636dab6c (patch)
treec5deb07d1a98a1e4f6380cd9c2e2e0968c863223 /riscos/plotters.c
parentcb70291739d15fcc6ee0a25d0f97846a52a2c6c0 (diff)
downloadnetsurf-e9598b10f830ca6b28b44ad418a9081b636dab6c.tar.gz
netsurf-e9598b10f830ca6b28b44ad418a9081b636dab6c.tar.bz2
[project @ 2005-02-21 21:31:31 by bursa]
Fix buffered font rendering. svn path=/import/netsurf/; revision=1523
Diffstat (limited to 'riscos/plotters.c')
-rw-r--r--riscos/plotters.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/riscos/plotters.c b/riscos/plotters.c
index d2f8d52a8..dad6b74e4 100644
--- a/riscos/plotters.c
+++ b/riscos/plotters.c
@@ -299,6 +299,10 @@ bool ro_plot_clip(int clip_x0, int clip_y0,
bool ro_plot_text(int x, int y, struct css_style *style,
const char *text, size_t length, colour bg, colour c)
{
+ const os_VDU_VAR_LIST(3) var_list = { { os_VDUVAR_ORGX, os_VDUVAR_ORGY,
+ os_VDUVAR_END_LIST } };
+ int value_list[3];
+ int dx = 0, dy = 0;
os_error *error;
error = xcolourtrans_set_font_colours(font_CURRENT,
@@ -309,9 +313,22 @@ bool ro_plot_text(int x, int y, struct css_style *style,
return false;
}
+ /* adjust by the origin (not if printing as the result is undefined) */
+ if (!print_active) {
+ error = xos_read_vdu_variables((const os_vdu_var_list *)
+ &var_list, value_list);
+ if (error) {
+ LOG(("xos_read_vdu_variables: 0x%x: %s",
+ error->errnum, error->errmess));
+ return false;
+ }
+ dx = value_list[0];
+ dy = value_list[1];
+ }
+
return nsfont_paint(style, text, length,
- ro_plot_origin_x + x * 2,
- ro_plot_origin_y - y * 2,
+ ro_plot_origin_x + dx + x * 2,
+ ro_plot_origin_y + dy - y * 2,
ro_plot_scale);
}