TuttleOFX
1
|
00001 #ifndef _TUTTLE_HOST_OVERLAYINTERACT_HPP_ 00002 #define _TUTTLE_HOST_OVERLAYINTERACT_HPP_ 00003 00004 #include "ImageEffectNode.hpp" 00005 00006 #include <tuttle/host/ofx/OfxhInteract.hpp> 00007 #include <tuttle/host/ofx/OfxhImageEffectNode.hpp> 00008 00009 #include <tuttle/host/Graph.hpp> 00010 #include <tuttle/host/graph/ProcessGraph.hpp> 00011 00012 namespace tuttle { 00013 namespace host { 00014 00015 /** 00016 * An overlay interact for image effects, derived from one of these to 00017 * be an overlay interact 00018 */ 00019 class OverlayInteract : public ofx::interact::OfxhInteract 00020 { 00021 protected: 00022 /// our image effect instance 00023 ImageEffectNode& _instance; 00024 int _bitDepthPerComponent; 00025 bool _hasAlpha; 00026 OfxTime _time; 00027 graph::ProcessGraph _procGraph; 00028 00029 public: 00030 OverlayInteract( Graph& userGraph, ImageEffectNode& effect, int bitDepthPerComponent = 8, bool hasAlpha = false ); 00031 00032 void setupGraph() 00033 { 00034 _procGraph.setup(); 00035 _procGraph.setupAtTime(_time); 00036 } 00037 00038 void draw( const OfxPointD& renderScale ); 00039 }; 00040 00041 } 00042 } 00043 00044 #endif 00045