New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 672222 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

canvas arcs: mitered and beveled joins not rendered correctly

Reported by tkloec...@googlemail.com, Dec 7 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

Steps to reproduce the problem:
open attached html file in chrome and in a different browser (firefox or ie). A canvas image with some arcs will be shown.

What is the expected behavior?

What went wrong?
 It renders differently in chrome vs other browsers, and looks as intended in the _other_ browsers. screen shots also attached. It seems to have to do with the lineJoin property when it comes to arcs. "round" looks OK, but "miter" and "bevel" do not. Code has default, i.e. "miter".

Did this work before? N/A 

Chrome version: 55.0.2883.75  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 23.0 r0
 
chrome.png
168 KB View Download
firefox.png
203 KB View Download
chromeCanvasBug.html
22.2 KB View Download
Components: -Blink Blink>Canvas

Comment 4 by ajha@chromium.org, Dec 8 2016

Labels: M-55
Labels: -M-55 M-57 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Tested this issue on Ubuntu 14.04, Windows-10 and Mac OS 10.12 using chrome latest stable #55.0.2883.75. By opening the file chromeCanvasBug.html observed the arc has different behavior while comparing with firefox.

Note: This is a non-regression issue seen from past M35-35.0.1849.0, Hence marking it as untriaged.

Thanks!

Comment 6 by junov@chromium.org, Jan 17 2017

Cc: senorblanco@chromium.org
Components: Internals>Skia
Owner: caryclark@chromium.org
Status: Assigned (was: Untriaged)
Summary: canvas arcs: mitered and beveled joins not rendered correctly (was: canvas arc bug)
Bug is in skia path rendering.
Looks like a problem constructing the join between arcs.
Here's a smaller test case.
reducedbug672222.htm
2.3 KB View Download
Here's an isolation of the bug in Skia:
https://fiddle.skia.org/c/@crbug672222

The bug is created by a narrow angle formed by computing where the first arc stops and a slightly offset point where the second arc starts, though the two points are intended to be the same. The greatest amount of error is probably introduced internally where the angles are converted from radians to degrees.
Status: WontFix (was: Assigned)
Safari also shows unexpected output.

The bug is as described in #8. The computed end of one arc does not precisely line up with the beginning of the next, and when the line joining the two angles sharply away from either end, a mitered join is drawn.

Different platforms and different browsers compute slightly different numbers. This example shouldn't be expected to draw identically everywhere.

There are several workarounds for the user: simpler math, using arcTo() instead, setting the join to bevel, setting the miter limit to a smaller value.
this is the last bug I reported.

Sign in to add a comment