diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2009-07-05 20:10:17 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2009-07-05 20:10:17 +0000 |
commit | 0ade453958339a28b4291aefd6fd0bd2e5038afd (patch) | |
tree | 5a6be53fef4f3790f5902d8ac574c6ef725b29bb /riscos/save_draw.c | |
parent | ab2391ade1592936b95b106d17a77ff09ba852a8 (diff) | |
download | netsurf-0ade453958339a28b4291aefd6fd0bd2e5038afd.tar.gz netsurf-0ade453958339a28b4291aefd6fd0bd2e5038afd.tar.bz2 |
Refactor fill plotter to take a style
svn path=/trunk/netsurf/; revision=8332
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 320f7bfb9..f74608cf3 100644 --- a/riscos/save_draw.c +++ b/riscos/save_draw.c @@ -44,7 +44,7 @@ static bool ro_save_draw_line(int x0, int y0, int x1, int y1, int width, static bool ro_save_draw_polygon(const int *p, unsigned int n, colour fill); 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_fill(int x0, int y0, int x1, int y1, colour c); +static bool ro_save_draw_fill(int x0, int y0, int x1, int y1, plot_style_t *style); 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, @@ -302,7 +302,7 @@ bool ro_save_draw_path(const float *p, unsigned int n, colour fill, } -bool ro_save_draw_fill(int x0, int y0, int x1, int y1, colour c) +bool ro_save_draw_fill(int x0, int y0, int x1, int y1, plot_style_t *style) { pencil_code code; const int path[] = { draw_MOVE_TO, x0 * 2, -y0 * 2 - 1, @@ -313,10 +313,11 @@ bool ro_save_draw_fill(int x0, int y0, int x1, int y1, colour c) draw_END_PATH }; code = pencil_path(ro_save_draw_diagram, path, - sizeof path / sizeof path[0], - c << 8, pencil_TRANSPARENT, 0, pencil_JOIN_MITRED, - pencil_CAP_BUTT, pencil_CAP_BUTT, 0, 0, false, - pencil_SOLID); + sizeof path / sizeof path[0], + style->fill_colour << 8, + pencil_TRANSPARENT, 0, pencil_JOIN_MITRED, + pencil_CAP_BUTT, pencil_CAP_BUTT, 0, 0, false, + pencil_SOLID); if (code != pencil_OK) return ro_save_draw_error(code); |