00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef TIL_COLOR_CURVES_H
00020 #define TIL_COLOR_CURVES_H
00021
00022 #include "TIL_API.h"
00023
00024 class TIL_API TIL_ColorCurves
00025 {
00026 public:
00027 TIL_ColorCurves(int curve_size = 256);
00028 ~TIL_ColorCurves();
00029
00030 void setValid(bool valid);
00031 void setValid(int comp, bool valid);
00032
00033 void setCurveSize(int size);
00034 int getCurveSize() const { return myCurveSize; }
00035
00036 const float *getCurve(int comp) const;
00037 float *getCurveForWrite(int comp);
00038
00039 void setDomain(float start, float end) { myStart=start; myEnd=end;}
00040 void getDomain(float &start, float &end) const
00041 { start = myStart; end = myEnd; }
00042
00043 void clampRange(float minr, float maxr);
00044
00045 private:
00046 bool myValid[4];
00047 float *myCurves[4];
00048 int myCurveSize;
00049 float myStart;
00050 float myEnd;
00051 };
00052
00053 #endif