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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
695 will be filled or framed based on the Style in the paint. | 695 will be filled or framed based on the Style in the paint. |
696 @param left The left side of the rectangle to be drawn | 696 @param left The left side of the rectangle to be drawn |
697 @param top The top side of the rectangle to be drawn | 697 @param top The top side of the rectangle to be drawn |
698 @param right The right side of the rectangle to be drawn | 698 @param right The right side of the rectangle to be drawn |
699 @param bottom The bottom side of the rectangle to be drawn | 699 @param bottom The bottom side of the rectangle to be drawn |
700 @param paint The paint used to draw the rect | 700 @param paint The paint used to draw the rect |
701 */ | 701 */ |
702 void drawRectCoords(SkScalar left, SkScalar top, SkScalar right, | 702 void drawRectCoords(SkScalar left, SkScalar top, SkScalar right, |
703 SkScalar bottom, const SkPaint& paint); | 703 SkScalar bottom, const SkPaint& paint); |
704 | 704 |
705 /** Draw the outline of the specified region using the specified paint. | |
706 @param region The region to be drawn | |
707 @param paint The paint used to draw the region | |
708 */ | |
709 void drawRegion(const SkRegion& region, const SkPaint& paint) { | |
reed1
2016/08/26 12:27:02
tiny nit: most of these non-virtuals we also put i
msarett
2016/08/26 13:20:14
SGTM, see https://codereview.chromium.org/22866930
| |
710 this->onDrawRegion(region, paint); | |
711 } | |
712 | |
705 /** Draw the specified oval using the specified paint. The oval will be | 713 /** Draw the specified oval using the specified paint. The oval will be |
706 filled or framed based on the Style in the paint. | 714 filled or framed based on the Style in the paint. |
707 @param oval The rectangle bounds of the oval to be drawn | 715 @param oval The rectangle bounds of the oval to be drawn |
708 @param paint The paint used to draw the oval | 716 @param paint The paint used to draw the oval |
709 */ | 717 */ |
710 void drawOval(const SkRect& oval, const SkPaint&); | 718 void drawOval(const SkRect& oval, const SkPaint&); |
711 | 719 |
712 /** | 720 /** |
713 * Draw the specified RRect using the specified paint The rrect will be fil led or stroked | 721 * Draw the specified RRect using the specified paint The rrect will be fil led or stroked |
714 * based on the Style in the paint. | 722 * based on the Style in the paint. |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1382 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 1390 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
1383 const SkPaint& paint); | 1391 const SkPaint& paint); |
1384 | 1392 |
1385 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 1393 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
1386 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); | 1394 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); |
1387 | 1395 |
1388 virtual void onDrawDrawable(SkDrawable*, const SkMatrix*); | 1396 virtual void onDrawDrawable(SkDrawable*, const SkMatrix*); |
1389 | 1397 |
1390 virtual void onDrawPaint(const SkPaint&); | 1398 virtual void onDrawPaint(const SkPaint&); |
1391 virtual void onDrawRect(const SkRect&, const SkPaint&); | 1399 virtual void onDrawRect(const SkRect&, const SkPaint&); |
1400 virtual void onDrawRegion(const SkRegion& region, const SkPaint& paint); | |
1392 virtual void onDrawOval(const SkRect&, const SkPaint&); | 1401 virtual void onDrawOval(const SkRect&, const SkPaint&); |
1393 virtual void onDrawArc(const SkRect&, SkScalar startAngle, SkScalar sweepAng le, bool useCenter, | 1402 virtual void onDrawArc(const SkRect&, SkScalar startAngle, SkScalar sweepAng le, bool useCenter, |
1394 const SkPaint&); | 1403 const SkPaint&); |
1395 virtual void onDrawRRect(const SkRRect&, const SkPaint&); | 1404 virtual void onDrawRRect(const SkRRect&, const SkPaint&); |
1396 virtual void onDrawPoints(PointMode, size_t count, const SkPoint pts[], cons t SkPaint&); | 1405 virtual void onDrawPoints(PointMode, size_t count, const SkPoint pts[], cons t SkPaint&); |
1397 virtual void onDrawVertices(VertexMode, int vertexCount, const SkPoint verti ces[], | 1406 virtual void onDrawVertices(VertexMode, int vertexCount, const SkPoint verti ces[], |
1398 const SkPoint texs[], const SkColor colors[], Sk Xfermode*, | 1407 const SkPoint texs[], const SkColor colors[], Sk Xfermode*, |
1399 const uint16_t indices[], int indexCount, const SkPaint&); | 1408 const uint16_t indices[], int indexCount, const SkPaint&); |
1400 | 1409 |
1401 virtual void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[], | 1410 virtual void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[], |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1686 | 1695 |
1687 class SkCanvasClipVisitor { | 1696 class SkCanvasClipVisitor { |
1688 public: | 1697 public: |
1689 virtual ~SkCanvasClipVisitor(); | 1698 virtual ~SkCanvasClipVisitor(); |
1690 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1699 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1691 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1700 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1692 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1701 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1693 }; | 1702 }; |
1694 | 1703 |
1695 #endif | 1704 #endif |
OLD | NEW |