Author: jmb
Date: Thu Jun 29 22:30:05 2006
New Revision: 2677
URL:
http://svn.semichrome.net?rev=2677&view=rev
Log:
Handle transparent borders correctly when plotting
Modified:
trunk/netsurf/render/html_redraw.c
Modified: trunk/netsurf/render/html_redraw.c
URL:
http://svn.semichrome.net/trunk/netsurf/render/html_redraw.c?rev=2677&...
==============================================================================
--- trunk/netsurf/render/html_redraw.c (original)
+++ trunk/netsurf/render/html_redraw.c Thu Jun 29 22:30:05 2006
@@ -756,6 +756,9 @@
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 @@
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 @@
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 @@
{
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 @@
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))