SkBlurDrawLooper Class Reference

#include <SkBlurDrawLooper.h>

Inherits SkDrawLooper.

Collaboration diagram for SkBlurDrawLooper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SkBlurDrawLooper (SkScalar radius, SkScalar dx, SkScalar dy, SkColor color)
virtual ~SkBlurDrawLooper ()
virtual void init (SkCanvas *, SkPaint *)
virtual bool next ()
virtual void restore ()

Static Public Member Functions

static SkFlattenableCreateProc (SkFlattenableReadBuffer &buffer)

Protected Member Functions

 SkBlurDrawLooper (SkFlattenableReadBuffer &)
virtual void flatten (SkFlattenableWriteBuffer &)
virtual Factory getFactory ()

Detailed Description

This class draws a shadow of the object (possibly offset), and then draws the original object in its original position. should there be an option to just draw the shadow/blur layer? webkit?

Definition at line 30 of file SkBlurDrawLooper.h.


Constructor & Destructor Documentation

SkBlurDrawLooper::SkBlurDrawLooper ( SkScalar  radius,
SkScalar  dx,
SkScalar  dy,
SkColor  color 
)
virtual SkBlurDrawLooper::~SkBlurDrawLooper (  )  [virtual]
SkBlurDrawLooper::SkBlurDrawLooper ( SkFlattenableReadBuffer  )  [protected]

Member Function Documentation

static SkFlattenable* SkBlurDrawLooper::CreateProc ( SkFlattenableReadBuffer buffer  )  [inline, static]

Definition at line 40 of file SkBlurDrawLooper.h.

virtual void SkBlurDrawLooper::flatten ( SkFlattenableWriteBuffer  )  [protected, virtual]

Override this to write data specific to your subclass into the buffer, being sure to call your super-class' version first. This data will later be passed to your Factory function, returned by getFactory().

Reimplemented from SkFlattenable.

virtual Factory SkBlurDrawLooper::getFactory (  )  [inline, protected, virtual]

Implement this to return a factory function pointer that can be called to recreate your class given a buffer (previously written to by your override of flatten().

Implements SkFlattenable.

Definition at line 48 of file SkBlurDrawLooper.h.

virtual void SkBlurDrawLooper::init ( SkCanvas ,
SkPaint  
) [virtual]

Called right before something is being drawn to the specified canvas with the specified paint. Subclass that want to modify either parameter can do so now.

Reimplemented from SkDrawLooper.

virtual bool SkBlurDrawLooper::next (  )  [virtual]

Called in a loop (after init()). Each time true is returned, the object is drawn (possibly with a modified canvas and/or paint). When false is finally returned, drawing for the object stops.

Reimplemented from SkDrawLooper.

virtual void SkBlurDrawLooper::restore (  )  [virtual]

Called after the looper has finally returned false from next(), allowing the looper to restore the canvas/paint to their original states. is this required, since the subclass knows when it is done??? should we pass the canvas/paint here, and/or to the next call so that subclasses don't need to retain pointers to them during the loop?

Reimplemented from SkDrawLooper.


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

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