SkLayerDrawLooper Class Reference

#include <SkLayerDrawLooper.h>

Inherits SkDrawLooper.

Collaboration diagram for SkLayerDrawLooper:
Collaboration graph
[legend]

List of all members.

Classes

struct  Iter
class  MyRegistrar
struct  Rec

Public Member Functions

 SkLayerDrawLooper ()
virtual ~SkLayerDrawLooper ()
SkPaintaddLayer (SkScalar dx, SkScalar dy)
SkPaintaddLayer ()
virtual void init (SkCanvas *, SkPaint *)
virtual bool next ()
virtual void restore ()

Static Public Member Functions

static SkFlattenableCreateProc (SkFlattenableReadBuffer &buffer)

Protected Member Functions

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

Detailed Description

Definition at line 8 of file SkLayerDrawLooper.h.


Constructor & Destructor Documentation

SkLayerDrawLooper::SkLayerDrawLooper (  ) 
virtual SkLayerDrawLooper::~SkLayerDrawLooper (  )  [virtual]
SkLayerDrawLooper::SkLayerDrawLooper ( SkFlattenableReadBuffer  )  [protected]

Member Function Documentation

SkPaint* SkLayerDrawLooper::addLayer (  )  [inline]

Helper for addLayer() which passes (0, 0) for the offset parameters

Definition at line 21 of file SkLayerDrawLooper.h.

SkPaint* SkLayerDrawLooper::addLayer ( SkScalar  dx,
SkScalar  dy 
)

Call for each layer you want to add (from top to bottom). This returns a paint you can modify, but that ptr is only valid until the next call made to this object.

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

Definition at line 31 of file SkLayerDrawLooper.h.

virtual void SkLayerDrawLooper::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 SkLayerDrawLooper::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 40 of file SkLayerDrawLooper.h.

virtual void SkLayerDrawLooper::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 SkLayerDrawLooper::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 SkLayerDrawLooper::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:42 2009 for Skia by  doxygen 1.6.1