Bug 16565
Summary: | CG Path Handling Seems Inverted | ||
---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | Keywords: | InRadar |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.4 |
Brent Fulgham
The HTML5 specification indicates that arc is:
"void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean anticlockwise);"
This was originally code with the boolean being labeled "clockwise", which resulted in the Cairo back-end drawing 'flipped' arcs (see Bug#16558).
Review of the code indicates that this was simply a matter of improper label, however the CoreGraphics backend has the following mysterious behavior:
The 'addArc' method takes a bool previously labeled 'clockwise', but which is now known to actually mean 'anticlockwise' when triggered by a request to draw. This flag is passed (unchanged) to the "CGPathAddArc" function, which is documented to expect this argument to mean 'clockwise' (not 'anticlockwise').
Consequently, I would expect the CG backend to be producing inverted drawings (however it does seem to produce the expected output).
Either:
1. The CGPathAddArc method is improperly documented in the Apple API docs.
2. The CG drawing context is flipped when finally rendering, resulting in a proper image.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
<rdar://problem/5661165>
Brent Fulgham
The code as written is correct. The documentation issue is outside the scope of the WebKit project.