TuttleOFX
1
|
00001 #ifndef _TUTTLE_HOST_CORE_ATTRIBUTE_PARAMRGBA_HPP_ 00002 #define _TUTTLE_HOST_CORE_ATTRIBUTE_PARAMRGBA_HPP_ 00003 00004 #include "Param.hpp" 00005 00006 #include "ParamDoubleMultiDim.hpp" 00007 00008 #include <ofxPixels.h> 00009 00010 namespace tuttle { 00011 namespace host { 00012 namespace attribute { 00013 00014 class ParamRGBA : public Param 00015 , public ParamDoubleMultiDim<4> 00016 { 00017 public: 00018 ParamRGBA( INode& effect, const std::string& name, const ofx::attribute::OfxhParamDescriptor& descriptor ); 00019 ParamRGBA* clone() const { return new ParamRGBA( *this ); } 00020 00021 OfxRGBAColourD getDefault() const; 00022 00023 void getValue( double& r, double& g, double& b, double& a ) const OFX_EXCEPTION_SPEC; 00024 void getValueAtTime( const OfxTime time, double& r, double& g, double& b, double& a ) const OFX_EXCEPTION_SPEC; 00025 00026 void setValue( const int& r, const int& g, const int& b, const int& a, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC 00027 { 00028 setValue( (double)r, (double)g, (double)b, (double)a, change ); 00029 } 00030 void setValue( const double& r, const double& g, const double& b, const double& a, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC; 00031 00032 00033 void setValueAtTime( const OfxTime time, const int& r, const int& g, const int& b, const int& a, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC 00034 { 00035 setValueAtTime( time, (double)r, (double)g, (double)b, (double)a, change ); 00036 } 00037 void setValueAtTime( const OfxTime time, const double& r, const double& g, const double& b, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC 00038 { 00039 setValueAtTime( time, r, g, b, 1.0, change ); 00040 } 00041 void setValueAtTime( const OfxTime time, const int& r, const int& g, const int& b, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC 00042 { 00043 setValueAtTime( time, (double)r, (double)g, (double)b, change ); 00044 } 00045 void setValueAtTime( const OfxTime time, const double& r, const double& g, const double& b, const double& a, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC; 00046 }; 00047 00048 } 00049 } 00050 } 00051 00052 #endif