WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 58934
arc() should add a circle to the path when start and end angles are far enough apart
https://bugs.webkit.org/show_bug.cgi?id=58934
Summary
arc() should add a circle to the path when start and end angles are far enoug...
Matthew Delaney
Reported
2011-04-19 15:32:09 PDT
The spec says: "If the anticlockwise argument is omitted or false and endAngle-startAngle is equal to or greater than 2π, or, if the anticlockwise argument is true and startAngle-endAngle is equal to or greater than 2π, then the arc is the whole circumference of this circle." [
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-arc
] We don't currently check for this case. The test fast/canvas/canvas-largedraws.html appears to somewhat exercise this case.
Attachments
Patch
(4.45 KB, patch)
2011-04-20 10:46 PDT
,
Matthew Delaney
no flags
Details
Formatted Diff
Diff
Patch
(4.24 KB, patch)
2011-04-20 13:41 PDT
,
Matthew Delaney
no flags
Details
Formatted Diff
Diff
Patch
(4.17 KB, patch)
2011-04-20 14:21 PDT
,
Matthew Delaney
mjs
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Matthew Delaney
Comment 1
2011-04-20 10:46:08 PDT
Created
attachment 90359
[details]
Patch
mitz
Comment 2
2011-04-20 10:51:08 PDT
Comment on
attachment 90359
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=90359&action=review
> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:856 > + if (anticlockwise && sa - ea >= 2.0f * piFloat) {
The coding style guidelines says that you should just write this as 2 * piFloat.
> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:859 > + m_path.addArc(FloatPoint(x, y), r, sa, sa - piFloat, anticlockwise); > + m_path.addArc(FloatPoint(x, y), r, sa - piFloat, sa, anticlockwise);
This can be done as a single 2π arc.
Matthew Delaney
Comment 3
2011-04-20 13:41:55 PDT
Created
attachment 90402
[details]
Patch
Matthew Delaney
Comment 4
2011-04-20 14:21:43 PDT
Created
attachment 90411
[details]
Patch
Maciej Stachowiak
Comment 5
2011-04-21 02:59:17 PDT
Comment on
attachment 90411
[details]
Patch r=me
Matthew Delaney
Comment 6
2011-04-21 11:51:36 PDT
http://trac.webkit.org/changeset/84512
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug