#include <SkTransparentShader.h>
Inherits SkShader.
Public Member Functions | |
SkTransparentShader () | |
virtual uint32_t | getFlags () |
virtual bool | setContext (const SkBitmap &device, const SkPaint &paint, const SkMatrix &matrix) |
virtual void | shadeSpan (int x, int y, SkPMColor[], int count) |
virtual void | shadeSpan16 (int x, int y, uint16_t span[], int count) |
virtual Factory | getFactory () |
virtual void | flatten (SkFlattenableWriteBuffer &buffer) |
Definition at line 22 of file SkTransparentShader.h.
SkTransparentShader::SkTransparentShader | ( | ) | [inline] |
Definition at line 24 of file SkTransparentShader.h.
virtual void SkTransparentShader::flatten | ( | SkFlattenableWriteBuffer & | ) | [inline, 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.
Definition at line 34 of file SkTransparentShader.h.
virtual Factory SkTransparentShader::getFactory | ( | ) | [inline, 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 33 of file SkTransparentShader.h.
virtual uint32_t SkTransparentShader::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 SkTransparentShader::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 SkTransparentShader::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 SkTransparentShader::shadeSpan16 | ( | int | x, | |
int | y, | |||
uint16_t | [], | |||
int | count | |||
) | [virtual] |
Called only for 16bit devices when getFlags() returns kOpaqueAlphaFlag | kHasSpan16_Flag
Reimplemented from SkShader.