diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-21 10:59:53 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-21 10:59:53 +0000 |
commit | 2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3 (patch) | |
tree | f3fe5f224c9e0e4089aca2d9012dfe1a74cf9c90 /riscos/save_draw.c | |
parent | 1930989f8ccdd574472ed72990b6a82fdcf9d5f4 (diff) | |
download | netsurf-2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3.tar.gz netsurf-2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3.tar.bz2 |
Refactor text plotter and other font functions to remove dependency on CSS.
svn path=/trunk/netsurf/; revision=8641
Diffstat (limited to 'riscos/save_draw.c')
-rw-r--r-- | riscos/save_draw.c | 13 |
1 files changed, 7 insertions, 6 deletions
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); |