TuttleOFX  1
RGBOverlay.hpp
Go to the documentation of this file.
00001 #ifndef RGBOVERLAY_HPP
00002 #define RGBOVERLAY_HPP
00003 
00004 #include "HistogramPlugin.hpp"
00005 #include "HistogramDisplay.hpp"
00006 
00007 #include <tuttle/plugin/global.hpp>
00008 #include <tuttle/plugin/interact/interact.hpp>
00009 #include <tuttle/plugin/interact/InteractInfos.hpp>
00010 
00011 #include <ofxsImageEffect.h>
00012 #include <ofxsInteract.h>
00013 
00014 namespace tuttle {
00015 namespace plugin {
00016 namespace histogram {
00017         
00018 /*
00019  *Enum used to know which RGB channel are selected
00020  */
00021 enum ESelectedChannelRGB
00022 {
00023         eSelectedChannelMoreRGB,                //More than one RGB channel are selected
00024         eSelectedChannelR,                              //Only red is selected
00025         eSelectedChannelG,                              //Only green is selected
00026         eSelectedChannelB,                              //Only blue is selected
00027         eSelectedChannelNoneRGB                 //None channel is selected
00028 };
00029 
00030 /// @todo class RGBOverlay : public OFX::OverlayInteract (when Nuke overlay works)
00031 class RGBOverlay
00032 {
00033 public:
00034         /*Class arguments*/
00035         HistogramPlugin* _plugin;       //plugin reference
00036         // interact::InteractInfos _infos; (when Nuke overlay works)
00037         bool _isGriddisplay;            //has grid been displayed yet
00038                 
00039         /*Creator*/
00040         //RGBOverlay(OfxInteractHandle handle, OFX::ImageEffect* effect); (when Nuke overlay works)
00041         RGBOverlay(HistogramPlugin* plugin);    //temporary
00042         
00043         /*Destructor*/
00044         ~RGBOverlay();
00045         
00046         /*draw main function*/
00047         bool draw(const OFX::DrawArgs& args);
00048         
00049         /*get selected channels*/
00050         ESelectedChannelRGB getOnlyChannelSelectedRGB()const;
00051         
00052         /*Display grid on screen*/
00053         void displayGrid(float height, float width);
00054         
00055         /*get overlay data*/
00056         OverlayData& getOverlayData();
00057 };
00058 
00059 }
00060 }
00061 }
00062 
00063 #endif  /* RGBOVERLAY_HPP */
00064