TuttleOFX
1
|
00001 #include "CropMargin.hpp" 00002 #include "CropPlugin.hpp" 00003 #include "tuttle/plugin/interact/overlay.hpp" 00004 00005 #include <tuttle/plugin/opengl/gl.h> 00006 00007 #include <ofxsImageEffect.h> 00008 #include <ofxsInteract.h> 00009 #include <boost/gil/gil_all.hpp> 00010 00011 namespace tuttle { 00012 namespace plugin { 00013 namespace crop { 00014 00015 bool CropOverlay::draw( const OFX::DrawArgs& args ) 00016 { 00017 using namespace boost::gil; 00018 CropPlugin* plugin = (CropPlugin*) _effect; 00019 00020 if( plugin && plugin->_paramOverlay->getValue() ) 00021 { 00022 CropProcessParams<rgba32f_pixel_t> params = plugin->getProcessParams<rgba32f_pixel_t>( args.time, args.renderScale); 00023 glColor3f( 1.0f, 1.0f, 1.0f ); 00024 overlay::displayRect( params._cropRegion ); 00025 return true; 00026 } 00027 return false; 00028 } 00029 00030 } 00031 } 00032 }