| 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 @param bottom The bottom side of the rectangle to be drawn | 700 @param bottom The bottom side of the rectangle to be drawn |
| 701 @param paint The paint used to draw the rect | 701 @param paint The paint used to draw the rect |
| 702 */ | 702 */ |
| 703 void drawRectCoords(SkScalar left, SkScalar top, SkScalar right, | 703 void drawRectCoords(SkScalar left, SkScalar top, SkScalar right, |
| 704 SkScalar bottom, const SkPaint& paint); | 704 SkScalar bottom, const SkPaint& paint); |
| 705 | 705 |
| 706 /** Draw the outline of the specified region using the specified paint. | 706 /** Draw the outline of the specified region using the specified paint. |
| 707 @param region The region to be drawn | 707 @param region The region to be drawn |
| 708 @param paint The paint used to draw the region | 708 @param paint The paint used to draw the region |
| 709 */ | 709 */ |
| 710 void drawRegion(const SkRegion& region, const SkPaint& paint) { | 710 void drawRegion(const SkRegion& region, const SkPaint& paint); |
| 711 if (region.isEmpty()) { | |
| 712 return; | |
| 713 } | |
| 714 | |
| 715 this->onDrawRegion(region, paint); | |
| 716 } | |
| 717 | 711 |
| 718 /** Draw the specified oval using the specified paint. The oval will be | 712 /** Draw the specified oval using the specified paint. The oval will be |
| 719 filled or framed based on the Style in the paint. | 713 filled or framed based on the Style in the paint. |
| 720 @param oval The rectangle bounds of the oval to be drawn | 714 @param oval The rectangle bounds of the oval to be drawn |
| 721 @param paint The paint used to draw the oval | 715 @param paint The paint used to draw the oval |
| 722 */ | 716 */ |
| 723 void drawOval(const SkRect& oval, const SkPaint&); | 717 void drawOval(const SkRect& oval, const SkPaint&); |
| 724 | 718 |
| 725 /** | 719 /** |
| 726 * Draw the specified RRect using the specified paint The rrect will be fil
led or stroked | 720 * Draw the specified RRect using the specified paint The rrect will be fil
led or stroked |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1723 | 1717 |
| 1724 class SkCanvasClipVisitor { | 1718 class SkCanvasClipVisitor { |
| 1725 public: | 1719 public: |
| 1726 virtual ~SkCanvasClipVisitor(); | 1720 virtual ~SkCanvasClipVisitor(); |
| 1727 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1721 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1728 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1722 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1729 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1723 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1730 }; | 1724 }; |
| 1731 | 1725 |
| 1732 #endif | 1726 #endif |
| OLD | NEW |