SkFilterShader Class Reference

#include <SkColorFilter.h>

Inherits SkShader.

Collaboration diagram for SkFilterShader:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SkFilterShader (SkShader *shader, SkColorFilter *filter)
virtual ~SkFilterShader ()
virtual uint32_t getFlags ()
virtual bool setContext (const SkBitmap &device, const SkPaint &paint, const SkMatrix &matrix)
virtual void shadeSpan (int x, int y, SkPMColor result[], int count)
virtual void shadeSpan16 (int x, int y, uint16_t result[], int count)
virtual void beginSession ()
virtual void endSession ()

Protected Member Functions

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

Detailed Description

Definition at line 97 of file SkColorFilter.h.


Constructor & Destructor Documentation

SkFilterShader::SkFilterShader ( SkShader shader,
SkColorFilter filter 
)
virtual SkFilterShader::~SkFilterShader (  )  [virtual]
SkFilterShader::SkFilterShader ( SkFlattenableReadBuffer  )  [protected]

Member Function Documentation

virtual void SkFilterShader::beginSession (  )  [virtual]

Called before a session using the shader begins. Some shaders override this to defer some of their work (like calling bitmap.lockPixels()). Must be balanced by a call to endSession.

Reimplemented from SkShader.

virtual void SkFilterShader::endSession (  )  [virtual]

Reimplemented from SkShader.

virtual void SkFilterShader::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 SkShader.

virtual Factory SkFilterShader::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 114 of file SkColorFilter.h.

virtual uint32_t SkFilterShader::getFlags (  )  [virtual]

Called sometimes before drawing with this shader. Return the type of alpha your shader will return. The default implementation returns 0. Your subclass should override if it can (even sometimes) report a non-zero value, since that will enable various blitters to perform faster.

Reimplemented from SkShader.

virtual bool SkFilterShader::setContext ( const SkBitmap device,
const SkPaint paint,
const SkMatrix matrix 
) [virtual]

Called once before drawing, with the current paint and device matrix. Return true if your shader supports these parameters, or false if not. If false is returned, nothing will be drawn.

Reimplemented from SkShader.

virtual void SkFilterShader::shadeSpan ( int  x,
int  y,
SkPMColor  [],
int  count 
) [virtual]

Called for each span of the object being drawn. Your subclass should set the appropriate colors (with premultiplied alpha) that correspond to the specified device coordinates.

Implements SkShader.

virtual void SkFilterShader::shadeSpan16 ( int  x,
int  y,
uint16_t  [],
int  count 
) [virtual]

Called only for 16bit devices when getFlags() returns kOpaqueAlphaFlag | kHasSpan16_Flag

Reimplemented from SkShader.


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