00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef HxUpoColSpace_h
00010 #define HxUpoColSpace_h
00011
00012 #include "HxTagList.h"
00013 #include "HxClassName.h"
00014 #include "HxColor.h"
00015
00016
00019 template<class DstValT, class SrcValT>
00020 class HxUpoColSpace
00021 {
00022 public:
00024 HxUpoColSpace(HxTagList& tags)
00025 {
00026 _fromSpace = HxGetTag<HxColorModel>(tags,
00027 "fromColorSpace");
00028 _toSpace = HxGetTag<HxColorModel>(tags,
00029 "toColorSpace");
00030 }
00031
00033 DstValT doIt(const SrcValT& x)
00034 { return HxColor(x,_fromSpace).convert(_toSpace).value();}
00035
00037 static HxString className()
00038 { return HxString("colorSpace"); }
00039
00040 private:
00041 HxColorModel _fromSpace;
00042 HxColorModel _toSpace;
00043 };
00044
00045 #endif