00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _COP2_COLORCURVE_H_
00021 #define _COP2_COLORCURVE_H_
00022
00023 #include "COP2_API.h"
00024 #define ARG_COLORCURVE_EDIT (myParmBase + 0)
00025 #define ARG_COLORCURVE_EXTEND (myParmBase + 1)
00026
00027 #define ARG_COLORCURVE_USE_COMP (myParmBase + 3)
00028 #define ARG_COLORCURVE_ALL (myParmBase + 4)
00029 #define ARG_COLORCURVE_RED (myParmBase + 5)
00030 #define ARG_COLORCURVE_GREEN (myParmBase + 6)
00031 #define ARG_COLORCURVE_BLUE (myParmBase + 7)
00032 #define ARG_COLORCURVE_ALPHA (myParmBase + 8)
00033
00034 #include "COP2_PixelOp.h"
00035
00036 class COP2_API COP2_ColorCurve : public COP2_PixelOp
00037 {
00038 public:
00039
00040 static OP_Node *myConstructor(OP_Network*, const char *,
00041 OP_Operator *);
00042 static OP_TemplatePair myTemplatePair;
00043 static OP_VariablePair myVariablePair;
00044 static PRM_Template myTemplateList[];
00045 static CH_LocalVariable myVariableList[];
00046 static const char * myInputLabels[];
00047
00048 static int componentModeChanged(void *, int, float,
00049 const PRM_Template *);
00050 static int globalChanged(void *, int, float,
00051 const PRM_Template *);
00052 static int redChanged(void *, int, float,
00053 const PRM_Template *);
00054 static int greenChanged(void *, int, float,
00055 const PRM_Template *);
00056 static int blueChanged(void *, int, float,
00057 const PRM_Template *);
00058 static int alphaChanged(void *, int, float,
00059 const PRM_Template *);
00060
00061 bool areComponentsModified();
00062
00063 void componentModeChanged();
00064 protected:
00065 virtual RU_PixelFunction *addPixelFunction(const TIL_Plane *plane,
00066 int array_index, float t,
00067 int xres, int yres,
00068 int thread);
00069
00070 virtual bool isFrameEffectHandled() { return false; }
00071
00072 virtual bool updateParmsFlags();
00073 private:
00074 COP2_ColorCurve(OP_Network *parent, const char *name,
00075 OP_Operator *entry);
00076 virtual ~COP2_ColorCurve();
00077
00078
00079
00080 bool EXTEND_SLOPE()
00081 { return (bool)evalInt(ARG_COLORCURVE_EXTEND,0,0.0f); }
00082
00083 int COLOR_CURVE_ALL() {return evalInt(ARG_COLORCURVE_ALL,0,0.0f);}
00084 bool COMPONENTS() {return evalInt(ARG_COLORCURVE_USE_COMP,0,0.0f);}
00085
00086 int COLOR_CURVE_COMP(int index)
00087 { return evalInt(ARG_COLORCURVE_RED+index,0,0.0f); }
00088
00089 void COLORCURVE_POINT_ALL(int index, float &x, float &y, float &s,
00090 float t);
00091 void COLORCURVE_POINT_COMP(int comp, int index, float &x, float &y,
00092 float &s, float t);
00093 int myParmBase;
00094 };
00095 #endif