summaryrefslogtreecommitdiff
path: root/riscos/plotters.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-07-21 10:59:53 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-07-21 10:59:53 +0000
commit2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3 (patch)
treef3fe5f224c9e0e4089aca2d9012dfe1a74cf9c90 /riscos/plotters.c
parent1930989f8ccdd574472ed72990b6a82fdcf9d5f4 (diff)
downloadnetsurf-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/plotters.c')
-rw-r--r--riscos/plotters.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/riscos/plotters.c b/riscos/plotters.c
index 38971d57c..ed44a2cd6 100644
--- a/riscos/plotters.c
+++ b/riscos/plotters.c
@@ -43,8 +43,8 @@ static bool ro_plot_path(const float *p, unsigned int n, colour fill, float widt
colour c, const float transform[6]);
static bool ro_plot_clip(int clip_x0, int clip_y0,
int clip_x1, int clip_y1);
-static bool ro_plot_text(int x, int y, const struct css_style *style,
- const char *text, size_t length, colour bg, colour c);
+static bool ro_plot_text(int x, int y, const char *text, size_t length,
+ const plot_font_style_t *fstyle);
static bool ro_plot_disc(int x, int y, int radius, const plot_style_t *style);
static bool ro_plot_arc(int x, int y, int radius, int angle1, int angle2,
const plot_style_t *style);
@@ -394,20 +394,21 @@ bool ro_plot_clip(int clip_x0, int clip_y0,
}
-bool ro_plot_text(int x, int y, const struct css_style *style,
- const char *text, size_t length, colour bg, colour c)
+bool ro_plot_text(int x, int y, const char *text, size_t length,
+ const plot_font_style_t *fstyle)
{
os_error *error;
error = xcolourtrans_set_font_colours(font_CURRENT,
- bg << 8, c << 8, 14, 0, 0, 0);
+ fstyle->background << 8, fstyle->foreground << 8,
+ 14, 0, 0, 0);
if (error) {
LOG(("xcolourtrans_set_font_colours: 0x%x: %s",
error->errnum, error->errmess));
return false;
}
- return nsfont_paint(style, text, length,
+ return nsfont_paint(fstyle, text, length,
ro_plot_origin_x + x * 2,
ro_plot_origin_y - y * 2,
ro_plot_scale);