Index: include/core/SkCanvas.h |
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
index 1e0301179a53d7f71d73a0372ee2cca7725ea667..0409057cab13828945543a8e1e0843e5744f4a0b 100644 |
--- a/include/core/SkCanvas.h |
+++ b/include/core/SkCanvas.h |
@@ -702,6 +702,14 @@ public: |
void drawRectCoords(SkScalar left, SkScalar top, SkScalar right, |
SkScalar bottom, const SkPaint& paint); |
+ /** Draw the outline of the specified region using the specified paint. |
+ @param region The region to be drawn |
+ @param paint The paint used to draw the region |
+ */ |
+ 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
|
+ this->onDrawRegion(region, paint); |
+ } |
+ |
/** Draw the specified oval using the specified paint. The oval will be |
filled or framed based on the Style in the paint. |
@param oval The rectangle bounds of the oval to be drawn |
@@ -1389,6 +1397,7 @@ protected: |
virtual void onDrawPaint(const SkPaint&); |
virtual void onDrawRect(const SkRect&, const SkPaint&); |
+ virtual void onDrawRegion(const SkRegion& region, const SkPaint& paint); |
virtual void onDrawOval(const SkRect&, const SkPaint&); |
virtual void onDrawArc(const SkRect&, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, |
const SkPaint&); |