From 2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 21 Jul 2009 10:59:53 +0000 Subject: Refactor text plotter and other font functions to remove dependency on CSS. svn path=/trunk/netsurf/; revision=8641 --- riscos/save_draw.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'riscos/save_draw.c') diff --git a/riscos/save_draw.c b/riscos/save_draw.c index 6dbd50ddb..1a75ee5f0 100644 --- a/riscos/save_draw.c +++ b/riscos/save_draw.c @@ -44,8 +44,8 @@ static bool ro_save_draw_path(const float *p, unsigned int n, colour fill, float width, colour c, const float transform[6]); static bool ro_save_draw_clip(int clip_x0, int clip_y0, int clip_x1, int clip_y1); -static bool ro_save_draw_text(int x, int y, const struct css_style *style, - const char *text, size_t length, colour bg, colour c); +static bool ro_save_draw_text(int x, int y, const char *text, size_t length, + const plot_font_style_t *fstyle); static bool ro_save_draw_disc(int x, int y, int radius, const plot_style_t *style); static bool ro_save_draw_arc(int x, int y, int radius, int angle1, int angle2, const plot_style_t *style); @@ -348,18 +348,19 @@ bool ro_save_draw_clip(int clip_x0, int clip_y0, } -bool ro_save_draw_text(int x, int y, const struct css_style *style, - const char *text, size_t length, colour bg, colour c) +bool ro_save_draw_text(int x, int y, const char *text, size_t length, + const plot_font_style_t *fstyle) { pencil_code code; const char *font_family; unsigned int font_size; rufl_style font_style; - nsfont_read_style(style, &font_family, &font_size, &font_style); + nsfont_read_style(fstyle, &font_family, &font_size, &font_style); code = pencil_text(ro_save_draw_diagram, x * 2, -y * 2, font_family, - font_style, font_size, text, length, c << 8); + font_style, font_size, text, length, + fstyle->foreground << 8); if (code != pencil_OK) return ro_save_draw_error(code); -- cgit v1.2.3