Bug 16565 - CG Path Handling Seems Inverted
Summary: CG Path Handling Seems Inverted
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-12-21 17:01 PST by Brent Fulgham
Modified: 2016-09-22 08:49 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2007-12-21 17:01:45 PST
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.
Comment 1 David Kilzer (:ddkilzer) 2007-12-21 19:43:21 PST
<rdar://problem/5661165>
Comment 2 Brent Fulgham 2016-09-22 08:49:29 PDT
The code as written is correct. The documentation issue is outside the scope of the WebKit project.