SkDrawFilter Class Reference

#include <SkDrawFilter.h>

Inherits SkRefCnt.

Inherited by SkPaintFlagsDrawFilter.

Collaboration diagram for SkDrawFilter:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Type {
  kPaint_Type, kPoint_Type, kLine_Type, kBitmap_Type,
  kRect_Type, kPath_Type, kText_Type
}

Public Member Functions

virtual bool filter (SkCanvas *, SkPaint *, Type)=0
virtual void restore (SkCanvas *, SkPaint *, Type)=0

Detailed Description

Right before something is being draw, filter() is called with the current canvas and paint. If it returns true, then drawing proceeds with the (possibly modified) canvas/paint, and then restore() is called to restore the canvas/paint to their state before filter() was called. If filter returns false, canvas/paint should not have been changed, and restore() will not be called.

Definition at line 34 of file SkDrawFilter.h.


Member Enumeration Documentation

Enumerator:
kPaint_Type 
kPoint_Type 
kLine_Type 
kBitmap_Type 
kRect_Type 
kPath_Type 
kText_Type 

Definition at line 36 of file SkDrawFilter.h.


Member Function Documentation

virtual bool SkDrawFilter::filter ( SkCanvas ,
SkPaint ,
Type   
) [pure virtual]

Return true to allow the draw to continue (with possibly modified canvas/paint). If true is returned, then restore() will be called.

Implemented in SkPaintFlagsDrawFilter.

virtual void SkDrawFilter::restore ( SkCanvas ,
SkPaint ,
Type   
) [pure virtual]

If filter() returned true, then restore() will be called to restore the canvas/paint to their previous states

Implemented in SkPaintFlagsDrawFilter.


The documentation for this class was generated from the following file:

Generated on Tue Oct 20 11:03:42 2009 for Skia by  doxygen 1.6.1