diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-01-31 22:40:03 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-01-31 22:40:03 +0000 |
commit | ad729c2fba84d73d4ab329d3fa23a3d557f154fb (patch) | |
tree | 42db8c87c6a299a80fbc55c889e1505ea0c496e6 /riscos | |
parent | be398523b4efdbe02aac7fd4597809a5e262846f (diff) | |
download | netsurf-ad729c2fba84d73d4ab329d3fa23a3d557f154fb.tar.gz netsurf-ad729c2fba84d73d4ab329d3fa23a3d557f154fb.tar.bz2 |
[project @ 2004-01-31 22:40:03 by jmb]
Fix text-decoration colours
svn path=/import/netsurf/; revision=524
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/htmlredraw.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/riscos/htmlredraw.c b/riscos/htmlredraw.c index c5c6d0da5..273a2a727 100644 --- a/riscos/htmlredraw.c +++ b/riscos/htmlredraw.c @@ -297,18 +297,36 @@ void html_redraw_box(struct content *content, struct box * box, colourtrans_set_gcol((unsigned int)colour << 8, colourtrans_USE_ECFS, os_ACTION_OVERWRITE, 0); - if (box->style->text_decoration & CSS_TEXT_DECORATION_UNDERLINE || (box->parent->parent->style->text_decoration & CSS_TEXT_DECORATION_UNDERLINE && box->parent->parent->type == BOX_BLOCK)) { + if (box->style->text_decoration & CSS_TEXT_DECORATION_UNDERLINE) { os_plot(os_MOVE_TO, x, y - (int) (box->height * 1.8)); os_plot(os_PLOT_SOLID_EX_END | os_PLOT_BY, box->width * 2, 0); } - if (box->style->text_decoration & CSS_TEXT_DECORATION_OVERLINE || (box->parent->parent->style->text_decoration & CSS_TEXT_DECORATION_OVERLINE && box->parent->parent->type == BOX_BLOCK)) { + if (box->parent->parent->style->text_decoration & CSS_TEXT_DECORATION_UNDERLINE && box->parent->parent->type == BOX_BLOCK) { + os_set_colour(0, box->parent->parent->style->color); + os_plot(os_MOVE_TO, x, y - (int) (box->height * 1.8)); + os_plot(os_PLOT_SOLID_EX_END | os_PLOT_BY, box->width * 2, 0); + os_set_colour(0, box->style->color); + } + if (box->style->text_decoration & CSS_TEXT_DECORATION_OVERLINE) { os_plot(os_MOVE_TO, x, y - (int) (box->height * 0.2)); os_plot(os_PLOT_SOLID_EX_END | os_PLOT_BY, box->width * 2, 0); } - if (box->style->text_decoration & CSS_TEXT_DECORATION_LINE_THROUGH || (box->parent->parent->style->text_decoration & CSS_TEXT_DECORATION_LINE_THROUGH && box->parent->parent->type == BOX_BLOCK)) { + if (box->parent->parent->style->text_decoration & CSS_TEXT_DECORATION_OVERLINE && box->parent->parent->type == BOX_BLOCK) { + os_set_colour(0, box->parent->parent->style->color); + os_plot(os_MOVE_TO, x, y - (int) (box->height * 0.2)); + os_plot(os_PLOT_SOLID_EX_END | os_PLOT_BY, box->width * 2, 0); + os_set_colour(0, box->style->color); + } + if (box->style->text_decoration & CSS_TEXT_DECORATION_LINE_THROUGH) { os_plot(os_MOVE_TO, x, y - (int) (box->height * 1.0)); os_plot(os_PLOT_SOLID_EX_END | os_PLOT_BY, box->width * 2, 0); } + if (box->parent->parent->style->text_decoration & CSS_TEXT_DECORATION_LINE_THROUGH && box->parent->parent->type == BOX_BLOCK) { + os_set_colour(0, box->parent->parent->style->color); + os_plot(os_MOVE_TO, x, y - (int) (box->height * 1.0)); + os_plot(os_PLOT_SOLID_EX_END | os_PLOT_BY, box->width * 2, 0); + os_set_colour(0, box->style->color); + } font_paint(box->font->handle, box->text, font_OS_UNITS | font_GIVEN_FONT | font_KERN | font_GIVEN_LENGTH, |