diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2006-06-29 21:30:05 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2006-06-29 21:30:05 +0000 |
commit | c5cb54b94d4b338a255f50e67fe6bd1a870691f1 (patch) | |
tree | 3eb5788bc450b01d4cc0a131860980f041d68bdc | |
parent | bf264373211b66987f3b99d754c0bdb806d33703 (diff) | |
download | netsurf-c5cb54b94d4b338a255f50e67fe6bd1a870691f1.tar.gz netsurf-c5cb54b94d4b338a255f50e67fe6bd1a870691f1.tar.bz2 |
Handle transparent borders correctly when plotting
svn path=/trunk/netsurf/; revision=2677
-rw-r--r-- | render/html_redraw.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/render/html_redraw.c b/render/html_redraw.c index b7555ca63..aeac805ab 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -756,6 +756,9 @@ bool html_redraw_border_plot(int i, int *p, colour c, unsigned int light = i; colour c_lit; + if (c == TRANSPARENT) + return true; + switch (style) { case CSS_BORDER_STYLE_DOTTED: dotted = true; @@ -947,9 +950,9 @@ bool html_redraw_checkbox(int x, int y, int width, int height, if (!(plot.fill(x, y, x + width, y + height, WIDGET_BASEC) && plot.line(x, y, x + width, y, 1, dark, false, false) && plot.line(x, y, x, y + height, 1, dark, false, false) && - plot.line(x + width, y, x + width, y + height, 1, lite, + plot.line(x + width, y, x + width, y + height, 1, lite, false, false) && - plot.line(x, y + height, x + width, y + height, 1, lite, + plot.line(x, y + height, x + width, y + height, 1, lite, false, false))) return false; @@ -962,12 +965,12 @@ bool html_redraw_checkbox(int x, int y, int width, int height, return false; } else { /* render a tick, as it'll fit comfortably */ - if (!(plot.line(x + width - z, + if (!(plot.line(x + width - z, y + z, x + (z * 3), y + height - z, 2, WIDGET_BLOBC, false, false) && - + plot.line(x + (z * 3), y + height - z, x + z + z, @@ -995,7 +998,7 @@ bool html_redraw_radio(int x, int y, int width, int height, { int dark = html_redraw_darker(html_redraw_darker(WIDGET_BASEC)); int lite = html_redraw_lighter(html_redraw_lighter(WIDGET_BASEC)); - + /* plot background of radio button */ if (!plot.disc(x + width * 0.5, y + height * 0.5, width * 0.5 - 1, WIDGET_BASEC, true)) @@ -1005,7 +1008,7 @@ bool html_redraw_radio(int x, int y, int width, int height, if (!plot.arc(x + width * 0.5, y + height * 0.5, width * 0.5 - 1, 45, 225, dark)) return false; - + /* plot light arc */ if (!plot.arc(x + width * 0.5, y + height * 0.5, width * 0.5 - 1, 225, 45, lite)) |