blob: 945e69f7eb3cb3839c37f4795e6dc5b79fe10e81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
|