TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_FADE_PLUGIN_HPP_ 00002 #define _TUTTLE_PLUGIN_FADE_PLUGIN_HPP_ 00003 00004 #include "FadeDefinitions.hpp" 00005 00006 #include <tuttle/plugin/ImageEffectGilPlugin.hpp> 00007 00008 namespace tuttle { 00009 namespace plugin { 00010 namespace fade { 00011 00012 struct FadeProcessParams 00013 { 00014 double _transition; 00015 EParamRod _rod; 00016 boost::gil::rgba32f_pixel_t _color; 00017 }; 00018 00019 /** 00020 * @brief Fade plugin 00021 */ 00022 class FadePlugin : public OFX::ImageEffect 00023 { 00024 public: 00025 typedef float Scalar; 00026 public: 00027 FadePlugin( OfxImageEffectHandle handle ); 00028 00029 public: 00030 FadeProcessParams getProcessParams() const; 00031 00032 void changedParam( const OFX::InstanceChangedArgs &args, const std::string ¶mName ); 00033 00034 // bool getRegionOfDefinition( const OFX::RegionOfDefinitionArguments& args, OfxRectD& rod ); 00035 bool isIdentity( const OFX::RenderArguments& args, OFX::Clip*& identityClip, double& identityTime ); 00036 00037 void render( const OFX::RenderArguments &args ); 00038 00039 public: 00040 OFX::Clip* _clipDst; ///< Destination image clip 00041 OFX::Clip* _clipSrcFrom; ///< Source image clip 00042 OFX::Clip* _clipSrcTo; ///< Source image clip 00043 00044 OFX::DoubleParam* _paramTransition; ///< Source image clip 00045 OFX::ChoiceParam* _paramRod; 00046 OFX::RGBAParam* _paramColor; 00047 }; 00048 00049 } 00050 } 00051 } 00052 00053 #endif