mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
improved text-decoration: overline accuracy
This commit is contained in:
parent
b19c200c6c
commit
ba9ace71ba
@ -168,7 +168,7 @@ _html2canvas.Parse = function (images, options) {
|
|||||||
renderRect(ctx, bounds.left, Math.round(bounds.top + metrics.baseline + metrics.lineWidth), bounds.width, 1, color);
|
renderRect(ctx, bounds.left, Math.round(bounds.top + metrics.baseline + metrics.lineWidth), bounds.width, 1, color);
|
||||||
break;
|
break;
|
||||||
case "overline":
|
case "overline":
|
||||||
renderRect(ctx, bounds.left, bounds.top, bounds.width, 1, color);
|
renderRect(ctx, bounds.left, Math.round(bounds.top), bounds.width, 1, color);
|
||||||
break;
|
break;
|
||||||
case "line-through":
|
case "line-through":
|
||||||
// TODO try and find exact position for line-through
|
// TODO try and find exact position for line-through
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<tr><td>list/upper-roman.html</td><td>99.45%</td><td>99.61%</td><td>35.11%</td></tr>
|
<tr><td>list/upper-roman.html</td><td>99.45%</td><td>99.61%</td><td>35.11%</td></tr>
|
||||||
<tr><td>overflow.html</td><td>96.85%</td><td>97.49%</td><td>96.51%</td></tr>
|
<tr><td>overflow.html</td><td>96.85%</td><td>97.49%</td><td>96.51%</td></tr>
|
||||||
<tr><td>text/linethrough.html</td><td>97.14%</td><td>94.12%</td><td>45.74%</td></tr>
|
<tr><td>text/linethrough.html</td><td>97.14%</td><td>94.12%</td><td>45.74%</td></tr>
|
||||||
<tr><td>text/text.html</td><td>95.42%</td><td>94.41%</td><td>79.85%</td></tr>
|
<tr><td>text/text.html</td><td>95.71%</td><td>94.67%</td><td>79.85%</td></tr>
|
||||||
<tr><td>text/underline-lineheight.html</td><td>97.06%</td><td>92.35%</td><td>51.38%</td></tr>
|
<tr><td>text/underline-lineheight.html</td><td>97.06%</td><td>92.35%</td><td>51.38%</td></tr>
|
||||||
<tr><td>text/underline.html</td><td>97.65%</td><td>93.5%</td><td>45.69%</td></tr>
|
<tr><td>text/underline.html</td><td>97.65%</td><td>93.5%</td><td>45.69%</td></tr>
|
||||||
<tr><td>visibility.html</td><td>99.19%</td><td>98.92%</td><td>99.39%</td></tr>
|
<tr><td>visibility.html</td><td>99.19%</td><td>98.92%</td><td>99.39%</td></tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user