diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2009-01-31 00:41:03 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2009-01-31 00:41:03 +0000 |
commit | 887d7984cbd9500f97590e29cc214942fbc234b2 (patch) | |
tree | ec83ab6ac64f6dd40d53ab56450f19f0145657b8 /render | |
parent | b132fba3994d5d2d51aa7f2a5c90c11a06a142f2 (diff) | |
download | netsurf-887d7984cbd9500f97590e29cc214942fbc234b2.tar.gz netsurf-887d7984cbd9500f97590e29cc214942fbc234b2.tar.bz2 |
Fix scale of inline borders.
svn path=/trunk/netsurf/; revision=6309
Diffstat (limited to 'render')
-rw-r--r-- | render/html_redraw.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/render/html_redraw.c b/render/html_redraw.c index cb13adc5a..afba91b8c 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -1031,20 +1031,7 @@ bool html_redraw_inline_borders(struct box *box, int x0, int y0, int x1, int y1, int right = box->border[RIGHT]; int bottom = box->border[BOTTOM]; int left = box->border[LEFT]; - - /* calculate border vertices */ - int p[20] = { - x0 + left, y0 + top, - x0, y0, - x1, y0, - x1 - right, y0 + top, - x1 - right, y1 - bottom, - x1, y1, - x0, y1, - x0 + left, y1 - bottom, - x0 + left, y0 + top, - x0, y0 - }; + int p[20]; if (scale != 1.0) { top *= scale; @@ -1053,6 +1040,18 @@ bool html_redraw_inline_borders(struct box *box, int x0, int y0, int x1, int y1, left *= scale; } + /* calculate border vertices */ + p[0] = x0 + left; p[1] = y0 + top; + p[2] = x0; p[3] = y0; + p[4] = x1; p[5] = y0; + p[6] = x1 - right; p[7] = y0 + top; + p[8] = x1 - right; p[9] = y1 - bottom; + p[10] = x1; p[11] = y1; + p[12] = x0; p[13] = y1; + p[14] = x0 + left; p[15] = y1 - bottom; + p[16] = x0 + left; p[17] = y0 + top; + p[18] = x0; p[19] = y0; + assert(box->style); if (box->border[LEFT] && first) |