#include <SkUnitMappers.h>
Inherits SkUnitMapper.
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 () |
This discretizes the range [0...1) into N discret values.
Definition at line 24 of file SkUnitMappers.h.
SkDiscreteMapper::SkDiscreteMapper | ( | int | segments | ) |
SkDiscreteMapper::SkDiscreteMapper | ( | SkFlattenableReadBuffer & | ) | [protected] |
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.