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