0456e0b7b8
http://codereview.appspot.com/6355043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4359 2bbb7eff-a529-9590-31e7-b0007b416f81
37 lines
686 B
C++
37 lines
686 B
C++
|
|
/*
|
|
* Copyright 2006 The Android Open Source Project
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
|
|
#ifndef SkUnitMapper_DEFINED
|
|
#define SkUnitMapper_DEFINED
|
|
|
|
#include "SkRefCnt.h"
|
|
#include "SkScalar.h"
|
|
|
|
#include "SkFlattenable.h"
|
|
|
|
class SkUnitMapper : public SkFlattenable {
|
|
public:
|
|
SK_DECLARE_INST_COUNT(SkUnitMapper)
|
|
|
|
SkUnitMapper() {}
|
|
|
|
/** Given a value in [0..0xFFFF], return a value in the same range.
|
|
*/
|
|
virtual uint16_t mapUnit16(uint16_t x) = 0;
|
|
|
|
protected:
|
|
SkUnitMapper(SkFlattenableReadBuffer& rb) : SkFlattenable(rb) {}
|
|
|
|
private:
|
|
typedef SkFlattenable INHERITED;
|
|
};
|
|
|
|
#endif
|
|
|