SkEmbossMaskFilter Class Reference

#include <SkEmbossMaskFilter.h>

Inherits SkMaskFilter.

Collaboration diagram for SkEmbossMaskFilter:
Collaboration graph
[legend]

List of all members.

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 &)

Detailed Description

This mask filter creates a 3D emboss look, by specifying a light and blur amount.

Definition at line 26 of file SkEmbossMaskFilter.h.


Constructor & Destructor Documentation

SkEmbossMaskFilter::SkEmbossMaskFilter ( const Light light,
SkScalar  blurRadius 
)
SkEmbossMaskFilter::SkEmbossMaskFilter ( SkFlattenableReadBuffer  )  [protected]

Member Function Documentation

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.

Parameters:
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.
Returns:
true if the dst mask was correctly created.

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.


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