| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkCanvas_DEFINED | 8 #ifndef SkCanvas_DEFINED |
| 9 #define SkCanvas_DEFINED | 9 #define SkCanvas_DEFINED |
| 10 | 10 |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 or framed based on the Style in the paint. | 730 or framed based on the Style in the paint. |
| 731 @param cx The x-coordinate of the center of the cirle to be drawn | 731 @param cx The x-coordinate of the center of the cirle to be drawn |
| 732 @param cy The y-coordinate of the center of the cirle to be drawn | 732 @param cy The y-coordinate of the center of the cirle to be drawn |
| 733 @param radius The radius of the cirle to be drawn | 733 @param radius The radius of the cirle to be drawn |
| 734 @param paint The paint used to draw the circle | 734 @param paint The paint used to draw the circle |
| 735 */ | 735 */ |
| 736 void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, | 736 void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, |
| 737 const SkPaint& paint); | 737 const SkPaint& paint); |
| 738 | 738 |
| 739 /** Draw the specified arc, which will be scaled to fit inside the | 739 /** Draw the specified arc, which will be scaled to fit inside the |
| 740 specified oval. If the sweep angle is >= 360, then the oval is drawn | 740 specified oval. Sweep angles are not treated as modulo 360 and thus can |
| 741 completely. Note that this differs slightly from SkPath::arcTo, which | 741 exceed a full sweep of the oval. Note that this differs slightly from |
| 742 treats the sweep angle mod 360. | 742 SkPath::arcTo, which treats the sweep angle mod 360. If the oval is empt
y |
| 743 or the sweep angle is zero nothing is drawn. If useCenter is true the ov
al |
| 744 center is inserted into the implied path before the arc and the path is |
| 745 closed back to the, center forming a wedge. Otherwise, the implied path |
| 746 contains just the arc and is not closed. |
| 743 @param oval The bounds of oval used to define the shape of the arc. | 747 @param oval The bounds of oval used to define the shape of the arc. |
| 744 @param startAngle Starting angle (in degrees) where the arc begins | 748 @param startAngle Starting angle (in degrees) where the arc begins |
| 745 @param sweepAngle Sweep angle (in degrees) measured clockwise. | 749 @param sweepAngle Sweep angle (in degrees) measured clockwise. |
| 746 @param useCenter true means include the center of the oval. For filling | 750 @param useCenter true means include the center of the oval. |
| 747 this will draw a wedge. False means just use the arc. | |
| 748 @param paint The paint used to draw the arc | 751 @param paint The paint used to draw the arc |
| 749 */ | 752 */ |
| 750 void drawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, | 753 void drawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, |
| 751 bool useCenter, const SkPaint& paint); | 754 bool useCenter, const SkPaint& paint); |
| 752 | 755 |
| 753 /** Draw the specified round-rect using the specified paint. The round-rect | 756 /** Draw the specified round-rect using the specified paint. The round-rect |
| 754 will be filled or framed based on the Style in the paint. | 757 will be filled or framed based on the Style in the paint. |
| 755 @param rect The rectangular bounds of the roundRect to be drawn | 758 @param rect The rectangular bounds of the roundRect to be drawn |
| 756 @param rx The x-radius of the oval used to round the corners | 759 @param rx The x-radius of the oval used to round the corners |
| 757 @param ry The y-radius of the oval used to round the corners | 760 @param ry The y-radius of the oval used to round the corners |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 | 1710 |
| 1708 class SkCanvasClipVisitor { | 1711 class SkCanvasClipVisitor { |
| 1709 public: | 1712 public: |
| 1710 virtual ~SkCanvasClipVisitor(); | 1713 virtual ~SkCanvasClipVisitor(); |
| 1711 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1714 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1712 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1715 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1713 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1716 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1714 }; | 1717 }; |
| 1715 | 1718 |
| 1716 #endif | 1719 #endif |
| OLD | NEW |