Open Bug 1202453 Opened 9 years ago Updated 2 years ago

Arc rendering not round, the error is proportionnal to dimension of the arc

Categories

(Core :: Graphics: Canvas2D, defect)

40 Branch
defect

Tracking

()

People

(Reporter: maetz.lucien, Unassigned)

References

Details

(Keywords: testcase, Whiteboard: [gfx-noted])

Attachments

(2 files)

Attached image bug2.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Build ID: 20150826023504

Steps to reproduce:

I draw an arc of 800 000px radius. I draw a line from center to border of arc.


Actual results:

At 45° and 90° the radius od the arc is good, but at 33° or 66° not.


Expected results:

I think the equation of drawing arc is not right, the core use the bezier cure equation instead of circle equation.
Severity: normal → critical
Severity: critical → normal
Could you attach the testcase (html file) to the bug report, please.
Flags: needinfo?(maetz.lucien)
Keywords: testcase-wanted
Attached file Test file with form
Flags: needinfo?(maetz.lucien)
Whiteboard: [gfx-noted]
It looks like there are some backend bugs in a few cases that cause us to rely instead upon the arc-to-bezier translation. In other cases, like canvas, we just assume the result of the translation will mostly be sane, but it will always break down if you zoom in enough.

If someone were inclined, there are maybe things that could be looked into like using a variable level of subdivision of the arc (instead of fixed 90-degree segments for large arcs), based on the transform and the calculated error at the given scale. The issue is not so much that we uses beziers as we just don't adequately subdivide at large scales.
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 949661
I think Safari does 8 segments, Chrome 4 like we do, but this may have changed.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: