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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 @param radius The radius of the cirle to be drawn | 732 @param radius The radius of the cirle to be drawn |
733 @param paint The paint used to draw the circle | 733 @param paint The paint used to draw the circle |
734 */ | 734 */ |
735 void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, | 735 void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, |
736 const SkPaint& paint); | 736 const SkPaint& paint); |
737 | 737 |
738 /** Draw the specified arc, which will be scaled to fit inside the | 738 /** Draw the specified arc, which will be scaled to fit inside the |
739 specified oval. If the sweep angle is >= 360, then the oval is drawn | 739 specified oval. If the sweep angle is >= 360, then the oval is drawn |
740 completely. Note that this differs slightly from SkPath::arcTo, which | 740 completely. Note that this differs slightly from SkPath::arcTo, which |
741 treats the sweep angle mod 360. | 741 treats the sweep angle mod 360. |
742 @param oval The bounds of oval used to define the shape of the arc | 742 @param oval The bounds of oval used to define the shape of the arc. |
743 @param startAngle Starting angle (in degrees) where the arc begins | 743 @param startAngle Starting angle (in degrees) where the arc begins |
744 @param sweepAngle Sweep angle (in degrees) measured clockwise | 744 @param sweepAngle Sweep angle (in degrees) measured clockwise. |
745 @param useCenter true means include the center of the oval. For filling | 745 @param useCenter true means include the center of the oval. For filling |
746 this will draw a wedge. False means just use the arc. | 746 this will draw a wedge. False means just use the arc. |
747 @param paint The paint used to draw the arc | 747 @param paint The paint used to draw the arc |
748 */ | 748 */ |
749 void drawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, | 749 void drawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, |
750 bool useCenter, const SkPaint& paint); | 750 bool useCenter, const SkPaint& paint); |
751 | 751 |
752 /** Draw the specified round-rect using the specified paint. The round-rect | 752 /** Draw the specified round-rect using the specified paint. The round-rect |
753 will be filled or framed based on the Style in the paint. | 753 will be filled or framed based on the Style in the paint. |
754 @param rect The rectangular bounds of the roundRect to be drawn | 754 @param rect The rectangular bounds of the roundRect to be drawn |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 const SkPaint& paint); | 1418 const SkPaint& paint); |
1419 | 1419 |
1420 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 1420 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
1421 const SkPoint texCoords[4], SkXfermode* xmode, const
SkPaint& paint); | 1421 const SkPoint texCoords[4], SkXfermode* xmode, const
SkPaint& paint); |
1422 | 1422 |
1423 virtual void onDrawDrawable(SkDrawable*, const SkMatrix*); | 1423 virtual void onDrawDrawable(SkDrawable*, const SkMatrix*); |
1424 | 1424 |
1425 virtual void onDrawPaint(const SkPaint&); | 1425 virtual void onDrawPaint(const SkPaint&); |
1426 virtual void onDrawRect(const SkRect&, const SkPaint&); | 1426 virtual void onDrawRect(const SkRect&, const SkPaint&); |
1427 virtual void onDrawOval(const SkRect&, const SkPaint&); | 1427 virtual void onDrawOval(const SkRect&, const SkPaint&); |
| 1428 virtual void onDrawArc(const SkRect&, SkScalar startAngle, SkScalar sweepAng
le, bool useCenter, |
| 1429 const SkPaint&); |
1428 virtual void onDrawRRect(const SkRRect&, const SkPaint&); | 1430 virtual void onDrawRRect(const SkRRect&, const SkPaint&); |
1429 virtual void onDrawPoints(PointMode, size_t count, const SkPoint pts[], cons
t SkPaint&); | 1431 virtual void onDrawPoints(PointMode, size_t count, const SkPoint pts[], cons
t SkPaint&); |
1430 virtual void onDrawVertices(VertexMode, int vertexCount, const SkPoint verti
ces[], | 1432 virtual void onDrawVertices(VertexMode, int vertexCount, const SkPoint verti
ces[], |
1431 const SkPoint texs[], const SkColor colors[], Sk
Xfermode*, | 1433 const SkPoint texs[], const SkColor colors[], Sk
Xfermode*, |
1432 const uint16_t indices[], int indexCount, const
SkPaint&); | 1434 const uint16_t indices[], int indexCount, const
SkPaint&); |
1433 | 1435 |
1434 virtual void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[],
const SkColor[], | 1436 virtual void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[],
const SkColor[], |
1435 int count, SkXfermode::Mode, const SkRect* cull, co
nst SkPaint*); | 1437 int count, SkXfermode::Mode, const SkRect* cull, co
nst SkPaint*); |
1436 virtual void onDrawPath(const SkPath&, const SkPaint&); | 1438 virtual void onDrawPath(const SkPath&, const SkPaint&); |
1437 virtual void onDrawImage(const SkImage*, SkScalar dx, SkScalar dy, const SkP
aint*); | 1439 virtual void onDrawImage(const SkImage*, SkScalar dx, SkScalar dy, const SkP
aint*); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1682 | 1684 |
1683 class SkCanvasClipVisitor { | 1685 class SkCanvasClipVisitor { |
1684 public: | 1686 public: |
1685 virtual ~SkCanvasClipVisitor(); | 1687 virtual ~SkCanvasClipVisitor(); |
1686 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1688 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1687 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1689 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1688 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1690 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1689 }; | 1691 }; |
1690 | 1692 |
1691 #endif | 1693 #endif |
OLD | NEW |