diff options
author | 2011-12-20 20:58:18 +0000 | |
---|---|---|
committer | 2011-12-20 20:58:18 +0000 | |
commit | e5ff3cefe007d092daf9d0bc2b03f9ff87b2c34e (patch) | |
tree | 9442d032a8b676b7a8070d544c605f769303b19e /include/core/SkColorFilter.h | |
parent | 9d0c6ecb8440e8e546881a4ff850eb6333f24541 (diff) |
Implement SkColorFilter::asColorMatrix() virtual, and override in
SkColorMatrixFilter. Implement missing SkColorMatrixFilter::setMatrix() and
setArray() functions (were in .h, just not implemented). Add a gm for color
matrix filters.
Review URL: http://codereview.appspot.com/5500044/
git-svn-id: http://skia.googlecode.com/svn/trunk@2909 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkColorFilter.h')
-rw-r--r-- | include/core/SkColorFilter.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h index e346996832..6328e706cb 100644 --- a/include/core/SkColorFilter.h +++ b/include/core/SkColorFilter.h @@ -23,6 +23,13 @@ public: */ virtual bool asColorMode(SkColor* color, SkXfermode::Mode* mode); + /** + * If the filter can be represented by a 5x4 matrix, this + * returns true, and sets the matrix appropriately. + * If not, this returns false and ignores the parameter. + */ + virtual bool asColorMatrix(SkScalar matrix[20]); + /** Called with a scanline of colors, as if there was a shader installed. The implementation writes out its filtered version into result[]. Note: shader and result may be the same buffer. |