diff options
author | mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-17 02:10:42 +0000 |
---|---|---|
committer | mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-17 02:10:42 +0000 |
commit | 37071640f6bdcb1bfb193f85b9ca615b29679425 (patch) | |
tree | 9add66a29d11e156454202502e603a1d956a512a /include | |
parent | 5bff6ec39f30f99a0029a498f5e4745badb960ba (diff) |
add gm for rrect, and rrect.inset/outset
git-svn-id: http://skia.googlecode.com/svn/trunk@6832 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkRRect.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/core/SkRRect.h b/include/core/SkRRect.h index eb2a770f62..ac2b7a2810 100644 --- a/include/core/SkRRect.h +++ b/include/core/SkRRect.h @@ -103,6 +103,9 @@ public: inline bool isSimple() const { return kSimple_Type == this->getType(); } inline bool isComplex() const { return kComplex_Type == this->getType(); } + SkScalar width() const { return fRect.width(); } + SkScalar height() const { return fRect.height(); } + /** * Set this RR to the empty rectangle (0,0,0,0) with 0 x & y radii. */ @@ -217,6 +220,17 @@ public: */ bool contains(SkScalar x, SkScalar y) const; + void inset(SkScalar dx, SkScalar dy, SkRRect* dst) const; + void inset(SkScalar dx, SkScalar dy) { + this->inset(dx, dy, this); + } + void outset(SkScalar dx, SkScalar dy, SkRRect* dst) const { + this->inset(-dx, -dy, dst); + } + void outset(SkScalar dx, SkScalar dy) { + this->inset(-dx, -dy, this); + } + SkDEBUGCODE(void validate() const;) enum { |