<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - SVG Rectangle strokes thicker than specified, in Safari and Webkit nightly (does not impact simple lines)"
href="https://bugs.webkit.org/show_bug.cgi?id=152834">152834</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>SVG Rectangle strokes thicker than specified, in Safari and Webkit nightly (does not impact simple lines)
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>Mac OS X 10.11
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Major
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>SVG
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andrejohn.mas@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>zimmermann@kde.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=268460" name="attach_268460" title="test-case">attachment 268460</a> <a href="attachment.cgi?id=268460&action=edit" title="test-case">[details]</a></span>
test-case
When a 'rect' (rectangle) is drawn in SVG I observe the stroke being thicker than specified 'stroke-width' and the equivalent specified value for a 'line'.
This is only an issue in SVG and specifying shape-rendering="crispEdges" does not help.
I have not found any work around and this impacts quality of rendered images.
I have not tested for other stroke scenarios.
SVG Sample
----------
<!-- Line thickness as expected -->
<svg id="svg1" style="width: 200px; height: 200px; background: white" shape-rendering="crispEdges">
<line x1="0" x2="200" y1="20" y2="20" stroke="#000000" style="stroke-width: 1px;"></line>
<line x1="0" x2="200" y1="40" y2="40" stroke="#000000" style="stroke-width: 2px;"></line>
</svg>
<!-- Line thickness does not correspond to simple lines -->
<svg id="svg2" style="width: 200px; height: 200px; background: white" shape-rendering="crispEdges">
<rect x="80" y="80" width="40" height="40" stroke="#000000" fill="none" style="stroke-width: 1px;"></rect>
<rect x="70" y="70" width="60" height="60" stroke="#000000" fill="none" style="stroke-width: 2px;"></rect>
</svg>
Browsers Tested In
------------------
I observe this behaviour:
- Webkit nightly 2016-07-01 (MacOS X 10.11)
- Safari 9.0.2 (MacOS X 10.11)
- Safari and other webkit based browsers on iOS 9.2
Behaves as expected:
- Opera 34 (MacOS X 10.11)
- Google Chrome 43 (MacOS X 10.11)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>