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

Unified Diff: include/core/SkCanvas.h

Issue 2281653002: Respecify SkCanvas::drawArc, consolidate conversion to SkPath, add GM for oddball drawArcs (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 4 months 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 | « gm/circulararcs.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 823c30fd7a99d15a6820c333db2433bbbbcb701a..bc3b25dc1b0e4bfdb7d9bb7314b66282a75210ab 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -737,14 +737,17 @@ public:
const SkPaint& paint);
/** Draw the specified arc, which will be scaled to fit inside the
- specified oval. If the sweep angle is >= 360, then the oval is drawn
- completely. Note that this differs slightly from SkPath::arcTo, which
- treats the sweep angle mod 360.
+ specified oval. Sweep angles are not treated as modulo 360 and thus can
+ exceed a full sweep of the oval. Note that this differs slightly from
+ SkPath::arcTo, which treats the sweep angle mod 360. If the oval is empty
+ or the sweep angle is zero nothing is drawn. If useCenter is true the oval
+ center is inserted into the implied path before the arc and the path is
+ closed back to the, center forming a wedge. Otherwise, the implied path
+ contains just the arc and is not closed.
@param oval The bounds of oval used to define the shape of the arc.
@param startAngle Starting angle (in degrees) where the arc begins
@param sweepAngle Sweep angle (in degrees) measured clockwise.
- @param useCenter true means include the center of the oval. For filling
- this will draw a wedge. False means just use the arc.
+ @param useCenter true means include the center of the oval.
@param paint The paint used to draw the arc
*/
void drawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
« no previous file with comments | « gm/circulararcs.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698