SkDiscreteMapper Class Reference

#include <SkUnitMappers.h>

Inherits SkUnitMapper.

Collaboration diagram for SkDiscreteMapper:
[legend]

List of all members.

Public Member Functions

 SkDiscreteMapper (int segments)
virtual uint16_t mapUnit16 (uint16_t x)

Protected Member Functions

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

Detailed Description

This discretizes the range [0...1) into N discret values.

Definition at line 24 of file SkUnitMappers.h.


Constructor & Destructor Documentation

SkDiscreteMapper::SkDiscreteMapper ( int  segments  ) 
SkDiscreteMapper::SkDiscreteMapper ( SkFlattenableReadBuffer  )  [protected]

Member Function Documentation

virtual void SkDiscreteMapper::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 SkDiscreteMapper::getFactory (  )  [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.

virtual uint16_t SkDiscreteMapper::mapUnit16 ( uint16_t  x  )  [virtual]

Given a value in [0..0xFFFF], return a value in the same range.

Implements SkUnitMapper.


The documentation for this class was generated from the following file:

Generated on Tue Oct 20 10:33:03 2009 for Skia by  doxygen 1.6.1