TuttleOFX
1
|
#include <HistogramOverlay.hpp>
Public Member Functions | |
HistogramOverlay (OfxInteractHandle handle, OFX::ImageEffect *effect) | |
~HistogramOverlay () | |
bool | draw (const OFX::DrawArgs &args) |
the function called to draw in the interact | |
bool | penDown (const OFX::PenArgs &args) |
bool | penUp (const OFX::PenArgs &args) |
bool | penMotion (const OFX::PenArgs &args) |
bool | keyDown (const OFX::KeyArgs &args) |
bool | keyUp (const OFX::KeyArgs &args) |
void | displaySelectedAreas (const OfxPointI &fullImgSize, const OfxPointI &imgSize, const OfxRectI &pixelRoD) |
void | displaySelectionZone () |
OverlayData & | getOverlayData () |
Data Fields | |
HistogramPlugin * | _plugin |
interact::InteractInfos | _infos |
bool | _penDown |
bool | _keyDown |
OfxPointI | _origin |
OfxPointI | _end |
OfxPointI | _squareBegin |
OfxPointI | _squareEnd |
bool | _isFirstTime |
HSLOverlay | _hslParam |
RGBOverlay | _rgbParam |
Private Types | |
typedef double | Scalar |
typedef OfxRGBColourF | Color |
Private Member Functions | |
void | drawWarning (const Ofx3DPointD ¢erPoint, const double ratio) |
Definition at line 20 of file HistogramOverlay.hpp.
typedef OfxRGBColourF tuttle::plugin::histogram::HistogramOverlay::Color [private] |
Definition at line 23 of file HistogramOverlay.hpp.
typedef double tuttle::plugin::histogram::HistogramOverlay::Scalar [private] |
Definition at line 22 of file HistogramOverlay.hpp.
tuttle::plugin::histogram::HistogramOverlay::HistogramOverlay | ( | OfxInteractHandle | handle, |
OFX::ImageEffect * | effect | ||
) |
Definition at line 9 of file HistogramOverlay.cpp.
References tuttle::plugin::histogram::OverlayData::_isDataInvalid, _isFirstTime, _keyDown, _penDown, _plugin, tuttle::plugin::histogram::HistogramPlugin::addRefOverlayData(), and getOverlayData().
tuttle::plugin::histogram::HistogramOverlay::~HistogramOverlay | ( | ) |
Definition at line 23 of file HistogramOverlay.cpp.
References _plugin, and tuttle::plugin::histogram::HistogramPlugin::releaseOverlayData().
void tuttle::plugin::histogram::HistogramOverlay::displaySelectedAreas | ( | const OfxPointI & | fullImgSize, |
const OfxPointI & | imgSize, | ||
const OfxRectI & | pixelRoD | ||
) |
Display the selected areas on the clip (color : gray)
Definition at line 339 of file HistogramOverlay.cpp.
References getOverlayData(), OfxPointI::x, OfxRectI::x1, OfxRectI::x2, OfxPointI::y, OfxRectI::y1, and OfxRectI::y2.
Referenced by draw().
void tuttle::plugin::histogram::HistogramOverlay::displaySelectionZone | ( | ) |
Display the selection zone on the clip (color : border gray)
Definition at line 375 of file HistogramOverlay.cpp.
References _squareBegin, _squareEnd, OfxPointI::x, and OfxPointI::y.
Referenced by draw().
bool tuttle::plugin::histogram::HistogramOverlay::draw | ( | const OFX::DrawArgs & | args | ) | [virtual] |
the function called to draw in the interact
< HACK changeClip method doesn't work in nuke when source clip is changed so we have to check size of imgBool all of the time
Reimplemented from OFX::InteractI.
Definition at line 28 of file HistogramOverlay.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, _hslParam, tuttle::plugin::histogram::OverlayData::_isDataInvalid, _isFirstTime, tuttle::plugin::histogram::HistogramPlugin::_isRendering, _keyDown, tuttle::plugin::histogram::HistogramPlugin::_paramDisplaySelection, tuttle::plugin::histogram::HistogramPlugin::_paramGlobalDisplaySelection, _penDown, _plugin, _rgbParam, tuttle::plugin::histogram::OverlayData::clearAll(), tuttle::plugin::histogram::OverlayData::computeFullData(), displaySelectedAreas(), displaySelectionZone(), tuttle::plugin::histogram::HSLOverlay::draw(), tuttle::plugin::histogram::RGBOverlay::draw(), drawWarning(), getOverlayData(), OFX::Clip::getPixelRod(), OFX::Clip::getPixelRodSize(), OFX::BooleanParam::getValue(), OFX::Clip::isConnected(), tuttle::plugin::histogram::OverlayData::isCurrentTimeModified(), tuttle::plugin::histogram::OverlayData::isImageSizeModified(), tuttle::plugin::histogram::kTranslationHSL, tuttle::plugin::histogram::kTranslationRGB, OFX::InteractArgs::renderScale, OFX::InteractArgs::time, OfxPointI::x, Ofx3DPointD::x, and Ofx3DPointD::y.
void tuttle::plugin::histogram::HistogramOverlay::drawWarning | ( | const Ofx3DPointD & | centerPoint, |
const double | ratio | ||
) | [private] |
Definition at line 397 of file HistogramOverlay.cpp.
References Ofx3DPointD::x, and Ofx3DPointD::y.
Referenced by draw().
OverlayData & tuttle::plugin::histogram::HistogramOverlay::getOverlayData | ( | ) |
Get overlay data from plugin
Definition at line 428 of file HistogramOverlay.cpp.
References _plugin, and tuttle::plugin::histogram::HistogramPlugin::getOverlayData().
Referenced by displaySelectedAreas(), draw(), HistogramOverlay(), keyUp(), penDown(), penMotion(), and penUp().
bool tuttle::plugin::histogram::HistogramOverlay::keyDown | ( | const OFX::KeyArgs & | args | ) | [virtual] |
Ctrl key is pressed down
args | current arg |
Reimplemented from OFX::InteractI.
Definition at line 303 of file HistogramOverlay.cpp.
References _keyDown, OFX::KeyArgs::keySymbol, kOfxKey_Control_L, and kOfxKey_Control_R.
bool tuttle::plugin::histogram::HistogramOverlay::keyUp | ( | const OFX::KeyArgs & | args | ) | [virtual] |
Ctrl key is released
args | current arg |
Reimplemented from OFX::InteractI.
Definition at line 319 of file HistogramOverlay.cpp.
References tuttle::plugin::histogram::OverlayData::_isDataInvalid, _keyDown, _penDown, _plugin, getOverlayData(), OFX::KeyArgs::keySymbol, kOfxKey_Control_L, kOfxKey_Control_R, and OFX::ImageEffect::redrawOverlays().
bool tuttle::plugin::histogram::HistogramOverlay::penDown | ( | const OFX::PenArgs & | args | ) | [virtual] |
When the pen/mouse is clicking down
args | current arg |
Reimplemented from OFX::InteractI.
Definition at line 156 of file HistogramOverlay.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, _end, _keyDown, _origin, tuttle::plugin::histogram::HistogramPlugin::_paramDisplaySelection, tuttle::plugin::histogram::HistogramPlugin::_paramSelectionMode, _penDown, _plugin, _squareBegin, _squareEnd, tuttle::plugin::histogram::OverlayData::clearSelection(), getOverlayData(), OFX::Clip::getPixelRodSize(), OFX::ChoiceParam::getValue(), OFX::BooleanParam::getValue(), OFX::PenArgs::penPosition, OFX::InteractArgs::renderScale, OFX::InteractArgs::time, OfxPointI::x, OfxPointD::x, OfxPointI::y, and OfxPointD::y.
bool tuttle::plugin::histogram::HistogramOverlay::penMotion | ( | const OFX::PenArgs & | args | ) | [virtual] |
When the pen/mouse is under motion
args | current arg |
Reimplemented from OFX::InteractI.
Definition at line 118 of file HistogramOverlay.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, tuttle::plugin::histogram::OverlayData::_imgBool, _keyDown, tuttle::plugin::histogram::HistogramPlugin::_paramSelectionMode, _penDown, _plugin, _squareEnd, getOverlayData(), OFX::Clip::getPixelRod(), OFX::ChoiceParam::getValue(), OFX::PenArgs::penPosition, OFX::InteractArgs::renderScale, OFX::InteractArgs::time, OfxPointI::x, OfxPointD::x, OfxRectI::x1, OfxPointI::y, OfxPointD::y, and OfxRectI::y1.
bool tuttle::plugin::histogram::HistogramOverlay::penUp | ( | const OFX::PenArgs & | args | ) | [virtual] |
When the pen/mouse is clicking up
args | current arg |
Reimplemented from OFX::InteractI.
Definition at line 205 of file HistogramOverlay.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, _end, tuttle::plugin::histogram::OverlayData::_imgBool, tuttle::plugin::histogram::OverlayData::_isDataInvalid, _keyDown, _origin, tuttle::plugin::histogram::HistogramPlugin::_paramSelectionMode, _penDown, _plugin, getOverlayData(), OFX::Clip::getPixelRod(), OFX::Clip::getPixelRodSize(), OFX::ChoiceParam::getValue(), OFX::PenArgs::penPosition, OFX::ImageEffect::redrawOverlays(), OFX::InteractArgs::renderScale, OFX::InteractArgs::time, OfxPointI::x, OfxPointD::x, OfxRectI::x1, OfxPointI::y, OfxPointD::y, and OfxRectI::y1.
Definition at line 33 of file HistogramOverlay.hpp.
Definition at line 40 of file HistogramOverlay.hpp.
Referenced by draw().
Definition at line 28 of file HistogramOverlay.hpp.
Definition at line 37 of file HistogramOverlay.hpp.
Referenced by draw(), and HistogramOverlay().
Definition at line 31 of file HistogramOverlay.hpp.
Referenced by draw(), HistogramOverlay(), keyDown(), keyUp(), penDown(), penMotion(), and penUp().
Definition at line 32 of file HistogramOverlay.hpp.
Definition at line 30 of file HistogramOverlay.hpp.
Referenced by draw(), HistogramOverlay(), keyUp(), penDown(), penMotion(), and penUp().
Definition at line 27 of file HistogramOverlay.hpp.
Referenced by draw(), getOverlayData(), HistogramOverlay(), keyUp(), penDown(), penMotion(), penUp(), and ~HistogramOverlay().
Definition at line 41 of file HistogramOverlay.hpp.
Referenced by draw().
Definition at line 34 of file HistogramOverlay.hpp.
Referenced by displaySelectionZone(), and penDown().
Definition at line 35 of file HistogramOverlay.hpp.
Referenced by displaySelectionZone(), penDown(), and penMotion().