Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkDrawFilter.h
1 
2 /*
3  * Copyright 2011 The Android Open Source Project
4  *
5  * Use of this source code is governed by a BSD-style license that can be
6  * found in the LICENSE file.
7  */
8 
9 
10 #ifndef SkDrawFilter_DEFINED
11 #define SkDrawFilter_DEFINED
12 
13 #include "SkRefCnt.h"
14 
15 class SkCanvas;
16 class SkPaint;
17 
26 class SK_API SkDrawFilter : public SkRefCnt {
27 public:
28  enum Type {
29  kPaint_Type,
30  kPoint_Type,
31  kLine_Type,
32  kBitmap_Type,
33  kRect_Type,
34  kRRect_Type,
35  kOval_Type,
36  kPath_Type,
37  kText_Type,
38  };
39 
40  enum {
41  kTypeCount = kText_Type + 1
42  };
43 
49  virtual bool filter(SkPaint*, Type) = 0;
50 
51 private:
52  typedef SkRefCnt INHERITED;
53 };
54 
55 #endif
A Canvas encapsulates all of the state about drawing into a device (bitmap).
Definition: SkCanvas.h:59
Definition: SkRefCnt.h:125
The SkPaint class holds the style and color information about how to draw geometries, text and bitmaps.
Definition: SkPaint.h:45
DEPRECATED - use SkPaintFilterCanvas instead.
Definition: SkDrawFilter.h:26