Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: webkit/port/platform/graphics/PathSkia.cpp

Issue 13756: Fix issue 3620... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/platform/graphics/PathSkia.cpp
===================================================================
--- webkit/port/platform/graphics/PathSkia.cpp (revision 6809)
+++ webkit/port/platform/graphics/PathSkia.cpp (working copy)
@@ -143,10 +143,14 @@
SkScalar startDegrees = WebCoreFloatToSkScalar(sa * 180 / gPI);
SkScalar sweepDegrees = WebCoreFloatToSkScalar(sweep * 180 / gPI);
+ // Counterclockwise arcs should be drawn with negative sweeps, while
+ // clockwise arcs should be drawn with positive sweeps. Check to see
+ // if the situation is reversed and correct it by adding or subtracting
+ // a full circle
if (anticlockwise && sweepDegrees > 0) {
sweepDegrees -= SkIntToScalar(360);
} else if (!anticlockwise && sweepDegrees < 0) {
- sweepDegrees = SkIntToScalar(360) - sweepDegrees;
+ sweepDegrees += SkIntToScalar(360);
}
// SkDebugf("addArc sa=%g ea=%g cw=%d start=%g sweep=%g\n", sa, ea, clockwise,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698