diff options
author | 2012-11-19 16:45:14 +0000 | |
---|---|---|
committer | 2012-11-19 16:45:14 +0000 | |
commit | dab9b4fe035c1e8a79e110139953c19bd48d66f9 (patch) | |
tree | 3704060c53f91edf25f130a5ae5601f16d3743ca /include/core | |
parent | 4f65a77a1f90f3a52d4da2ed72ca4ea8cb088a16 (diff) |
use SkPath::isNestedRects() to apply blurred nine-patch
Review URL: https://codereview.appspot.com/6855063
git-svn-id: http://skia.googlecode.com/svn/trunk@6483 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkMaskFilter.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h index 6bdc5335e8..3060e2f542 100644 --- a/include/core/SkMaskFilter.h +++ b/include/core/SkMaskFilter.h @@ -111,6 +111,12 @@ protected: kUnimplemented_FilterReturn }; + struct NinePatch { + SkMask fMask; // fBounds must have [0,0] in its top-left + SkIRect fOuterRect; // width/height must be >= fMask.fBounds' + SkIPoint fCenter; // identifies center row/col for stretching + }; + /** * Override if your subclass can filter a rect, and return the answer as * a ninepatch mask to be stretched over the returned outerRect. On success @@ -126,10 +132,10 @@ protected: * the caller will call mask.fBounds.centerX() and centerY() to find the * strips that will be replicated. */ - virtual FilterReturn filterRectToNine(const SkRect&, const SkMatrix&, - const SkIRect& clipBounds, - SkMask* ninePatchMask, - SkIRect* outerRect); + virtual FilterReturn filterRectsToNine(const SkRect[], int count, + const SkMatrix&, + const SkIRect& clipBounds, + NinePatch*); private: friend class SkDraw; |