diff options
Diffstat (limited to 'libs/hwui/Outline.h')
-rw-r--r-- | libs/hwui/Outline.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/Outline.h b/libs/hwui/Outline.h index 530be30..5c24335 100644 --- a/libs/hwui/Outline.h +++ b/libs/hwui/Outline.h @@ -58,11 +58,24 @@ public: mShouldClip = clip; } + bool getShouldClip() const { + return mShouldClip; + } + bool willClip() const { // only round rect outlines can be used for clipping return mShouldClip && (mType == kOutlineType_RoundRect); } + bool getAsRoundRect(Rect* outRect, float* outRadius) const { + if (mType == kOutlineType_RoundRect) { + outRect->set(mBounds); + *outRadius = mRadius; + return true; + } + return false; + } + const SkPath* getPath() const { if (mType == kOutlineType_None) return NULL; |