aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkCanvas.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r--include/core/SkCanvas.h47
1 files changed, 36 insertions, 11 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 5bbfc74a9a..3b3dbc4224 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -27,6 +27,7 @@ class SkDraw;
class SkDrawFilter;
class SkMetaData;
class SkPicture;
+class SkRRect;
class SkSurface_Base;
/** \class SkCanvas
@@ -339,20 +340,35 @@ public:
*/
void resetMatrix();
- /** Modify the current clip with the specified rectangle.
- @param rect The rect to intersect with the current clip
- @param op The region op to apply to the current clip
- @return true if the canvas' clip is non-empty
- */
+ /**
+ * Modify the current clip with the specified rectangle.
+ * @param rect The rect to combine with the current clip
+ * @param op The region op to apply to the current clip
+ * @param doAntiAlias true if the clip should be antialiased
+ * @return true if the canvas' clip is non-empty
+ */
virtual bool clipRect(const SkRect& rect,
SkRegion::Op op = SkRegion::kIntersect_Op,
bool doAntiAlias = false);
- /** Modify the current clip with the specified path.
- @param path The path to apply to the current clip
- @param op The region op to apply to the current clip
- @return true if the canvas' new clip is non-empty
- */
+ /**
+ * Modify the current clip with the specified SkRRect.
+ * @param rrect The rrect to combine with the current clip
+ * @param op The region op to apply to the current clip
+ * @param doAntiAlias true if the clip should be antialiased
+ * @return true if the canvas' clip is non-empty
+ */
+ virtual bool clipRRect(const SkRRect& rrect,
+ SkRegion::Op op = SkRegion::kIntersect_Op,
+ bool doAntiAlias = false);
+
+ /**
+ * Modify the current clip with the specified path.
+ * @param path The path to combine with the current clip
+ * @param op The region op to apply to the current clip
+ * @param doAntiAlias true if the clip should be antialiased
+ * @return true if the canvas' new clip is non-empty
+ */
virtual bool clipPath(const SkPath& path,
SkRegion::Op op = SkRegion::kIntersect_Op,
bool doAntiAlias = false);
@@ -577,7 +593,16 @@ public:
@param oval The rectangle bounds of the oval to be drawn
@param paint The paint used to draw the oval
*/
- void drawOval(const SkRect& oval, const SkPaint&);
+ virtual void drawOval(const SkRect& oval, const SkPaint&);
+
+ /**
+ * Draw the specified RRect using the specified paint The rrect will be filled or stroked
+ * based on the Style in the paint.
+ *
+ * @param rrect The round-rect to draw
+ * @param paint The paint used to draw the round-rect
+ */
+ virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint);
/** Draw the specified circle using the specified paint. If radius is <= 0,
then nothing will be drawn. The circle will be filled