diff options
author | bsalomon <bsalomon@google.com> | 2016-08-25 12:29:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-25 12:29:24 -0700 |
commit | 21af9ca1b1f54d9ba1de055aa8475928d5c8ecdf (patch) | |
tree | 2d1d5dae4e72fd6066aff3ce812cd387922c5baa /include | |
parent | 29b2563afb1677515739f1d24fb27733626eca92 (diff) |
Respecify SkCanvas::drawArc, consolidate conversion to SkPath, add GM for oddball drawArcs
Allows the arc to wind more than 360 degrees when useCenter is true, specs that nothing draws
if the oval is empty or the sweep angle is 0.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2281653002
Review-Url: https://codereview.chromium.org/2281653002
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 823c30fd7a..bc3b25dc1b 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, |