TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_PRINT_PLUGIN_HPP_ 00002 #define _TUTTLE_PLUGIN_PRINT_PLUGIN_HPP_ 00003 00004 #include "PrintDefinitions.hpp" 00005 00006 #include <tuttle/plugin/ImageEffectGilPlugin.hpp> 00007 00008 namespace tuttle { 00009 namespace plugin { 00010 namespace print { 00011 00012 template<typename Scalar> 00013 struct PrintProcessParams 00014 { 00015 EParamMode _mode; 00016 EParamOutput _output; 00017 EParamColor _colorMode; 00018 boost::gil::point2<std::ptrdiff_t> _pixel; 00019 OfxRectI _region; 00020 bool _flip; 00021 bool _openGlViewer; 00022 int _cols; 00023 }; 00024 00025 /** 00026 * @brief Print plugin 00027 */ 00028 class PrintPlugin : public ImageEffectGilPlugin 00029 { 00030 public: 00031 typedef float Scalar; 00032 public: 00033 PrintPlugin( OfxImageEffectHandle handle ); 00034 00035 public: 00036 PrintProcessParams<Scalar> getProcessParams( const OfxPointD& renderScale = OFX::kNoRenderScale ) const; 00037 00038 void changedParam( const OFX::InstanceChangedArgs &args, const std::string ¶mName ); 00039 00040 // bool getRegionOfDefinition( const OFX::RegionOfDefinitionArguments& args, OfxRectD& rod ); 00041 // void getRegionsOfInterest( const OFX::RegionsOfInterestArguments& args, OFX::RegionOfInterestSetter& rois ); 00042 bool isIdentity( const OFX::RenderArguments& args, OFX::Clip*& identityClip, double& identityTime ); 00043 00044 void render( const OFX::RenderArguments &args ); 00045 00046 public: 00047 OFX::ChoiceParam* _paramMode; 00048 OFX::ChoiceParam* _paramOutput; 00049 OFX::ChoiceParam* _paramColor; 00050 OFX::Int2DParam* _paramPixel; 00051 OFX::Int2DParam* _paramRegionMin; 00052 OFX::Int2DParam* _paramRegionMax; 00053 OFX::IntParam* _paramOutputColumns; 00054 OFX::BooleanParam* _paramFlip; 00055 OFX::BooleanParam* _paramOpenGlWindow; 00056 private: 00057 void updateParams(); 00058 }; 00059 00060 } 00061 } 00062 } 00063 00064 #endif