#include <SkEmbossMaskFilter.h>
Inherits SkMaskFilter.
Classes | |
struct | Light |
Public Member Functions | |
SkEmbossMaskFilter (const Light &light, SkScalar blurRadius) | |
virtual SkMask::Format | getFormat () |
virtual bool | filterMask (SkMask *dst, const SkMask &src, const SkMatrix &matrix, SkIPoint *margin) |
virtual Factory | getFactory () |
virtual void | flatten (SkFlattenableWriteBuffer &) |
Protected Member Functions | |
SkEmbossMaskFilter (SkFlattenableReadBuffer &) |
This mask filter creates a 3D emboss look, by specifying a light and blur amount.
Definition at line 26 of file SkEmbossMaskFilter.h.
SkEmbossMaskFilter::SkEmbossMaskFilter | ( | SkFlattenableReadBuffer & | ) | [protected] |
virtual bool SkEmbossMaskFilter::filterMask | ( | SkMask * | dst, | |
const SkMask & | src, | |||
const SkMatrix & | , | |||
SkIPoint * | margin | |||
) | [virtual] |
Create a new mask by filter the src mask. If src.fImage == null, then do not allocate or create the dst image but do fill out the other fields in dstMask. If you do allocate a dst image, use SkMask::AllocImage() If this returns false, dst mask is ignored.
dst | the result of the filter. If src.fImage == null, dst should not allocate its image | |
src | the original image to be filtered. | |
matrix | the CTM | |
margin | if not null, return the buffer dx/dy need when calculating the effect. Used when drawing a clipped object to know how much larger to allocate the src before applying the filter. If returning false, ignore this parameter. |
Reimplemented from SkMaskFilter.
virtual void SkEmbossMaskFilter::flatten | ( | SkFlattenableWriteBuffer & | ) | [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 SkMaskFilter.
virtual Factory SkEmbossMaskFilter::getFactory | ( | ) | [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.
virtual SkMask::Format SkEmbossMaskFilter::getFormat | ( | ) | [virtual] |
Returns the format of the resulting mask that this subclass will return when its filterMask() method is called.
Implements SkMaskFilter.