| 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 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. | 705 /** Draw the outline of the specified region using the specified paint. |
| 706 @param region The region to be drawn | 706 @param region The region to be drawn |
| 707 @param paint The paint used to draw the region | 707 @param paint The paint used to draw the region |
| 708 */ | 708 */ |
| 709 void drawRegion(const SkRegion& region, const SkPaint& paint) { | 709 void drawRegion(const SkRegion& region, const SkPaint& paint) { |
| 710 if (region.isEmpty()) { |
| 711 return; |
| 712 } |
| 713 |
| 710 this->onDrawRegion(region, paint); | 714 this->onDrawRegion(region, paint); |
| 711 } | 715 } |
| 712 | 716 |
| 713 /** Draw the specified oval using the specified paint. The oval will be | 717 /** Draw the specified oval using the specified paint. The oval will be |
| 714 filled or framed based on the Style in the paint. | 718 filled or framed based on the Style in the paint. |
| 715 @param oval The rectangle bounds of the oval to be drawn | 719 @param oval The rectangle bounds of the oval to be drawn |
| 716 @param paint The paint used to draw the oval | 720 @param paint The paint used to draw the oval |
| 717 */ | 721 */ |
| 718 void drawOval(const SkRect& oval, const SkPaint&); | 722 void drawOval(const SkRect& oval, const SkPaint&); |
| 719 | 723 |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1695 | 1699 |
| 1696 class SkCanvasClipVisitor { | 1700 class SkCanvasClipVisitor { |
| 1697 public: | 1701 public: |
| 1698 virtual ~SkCanvasClipVisitor(); | 1702 virtual ~SkCanvasClipVisitor(); |
| 1699 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1703 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1700 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1704 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1701 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1705 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1702 }; | 1706 }; |
| 1703 | 1707 |
| 1704 #endif | 1708 #endif |
| OLD | NEW |