experimental

git-svn-id: http://skia.googlecode.com/svn/trunk@2320 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-09-23 14:49:49 +00:00
parent 2caf69d246
commit 894aa9a7af

View File

@ -0,0 +1,40 @@
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkImageFilter_DEFINED
#define SkImageFilter_DEFINED
#include "SkFlattenable.h"
class SkImageFilter : public SkFlattenable {
public:
/**
* Request a new (result) image to be created from the src image.
* If the src has no pixels (isNull()) then the request just wants to
* receive the config and width/height of the result.
*
* The matrix is the current matrix on the canvas.
*
* Offset is the amount to translate the resulting image relative to the
* src when it is drawn.
*
* If the result image cannot be created, return false, in which case both
* the result and offset parameters will be ignored by the caller.
*/
bool filterImage(const SkBitmap& src, const SkMatrix&,
SkBitmap* result, SkPoint* offset);
protected:
virtual bool onFilterImage(const SkBitmap& src, const SkMatrix&
SkBitmap* result, SkPoint* offset) = 0;
private:
typedef SkFlattenable INHERITED;
};
#endif