TuttleOFX  1
tuttle::plugin::crop::CropPlugin Class Reference

#include <CropPlugin.hpp>

Inheritance diagram for tuttle::plugin::crop::CropPlugin:
Collaboration diagram for tuttle::plugin::crop::CropPlugin:

Public Member Functions

 CropPlugin (OfxImageEffectHandle handle)
template<class Pixel >
CropProcessParams< Pixel > getProcessParams (const OfxTime time, const OfxPointD &renderScale=OFX::kNoRenderScale) const
OfxRectI getCropRegionValue () const
OfxRectI computeCropRegion (const OfxTime time, const bool fromRatio=false) const
void changedClip (const OFX::InstanceChangedArgs &args, const std::string &clipName)
 called when a clip has just been changed in some way (a rewire maybe)
void changedParam (const OFX::InstanceChangedArgs &args, const std::string &paramName)
 called when a param has just had its value changed
bool getRegionOfDefinition (const OFX::RegionOfDefinitionArguments &args, OfxRectD &rod)
 The get RoD action.
void render (const OFX::RenderArguments &args)
 The overridden render function.

Data Fields

OFX::ChoiceParam_paramMode
OFX::RGBAParam_paramFillColor
OFX::ChoiceParam_paramAxis
OFX::ChoiceParam_paramSymmetric
OFX::BooleanParam_paramFixedRatio
OFX::DoubleParam_paramRatio
OFX::ChoiceParam_paramPreset
OFX::BooleanParam_paramOverlay
OFX::GroupParam_paramCropRegion
OFX::IntParam_paramXMin
OFX::IntParam_paramYMin
OFX::IntParam_paramXMax
OFX::IntParam_paramYMax

Static Private Member Functions

static int safeModulo (const int &cropValue, const int &rodValue)

Private Attributes

OFX::InstanceChangedArgs _changedArgs

Detailed Description

Definition at line 25 of file CropPlugin.hpp.


Constructor & Destructor Documentation


Member Function Documentation

void tuttle::plugin::crop::CropPlugin::changedClip ( const OFX::InstanceChangedArgs args,
const std::string &  clipName 
) [virtual]

called when a clip has just been changed in some way (a rewire maybe)

Reimplemented from OFX::ImageEffect.

Definition at line 181 of file CropPlugin.cpp.

References _changedArgs, changedParam(), kOfxImageEffectSimpleSourceClipName, and tuttle::plugin::crop::kParamRatio.

Here is the call graph for this function:

void tuttle::plugin::crop::CropPlugin::changedParam ( const OFX::InstanceChangedArgs args,
const std::string &  paramName 
) [virtual]

called when a param has just had its value changed

Reimplemented from OFX::ImageEffect.

Definition at line 192 of file CropPlugin.cpp.

References _paramAxis, _paramFixedRatio, _paramPreset, _paramRatio, _paramSymmetric, _paramXMax, _paramXMin, _paramYMax, _paramYMin, computeCropRegion(), tuttle::plugin::crop::eParamAxisX, tuttle::plugin::crop::eParamAxisXY, tuttle::plugin::crop::eParamAxisY, tuttle::plugin::crop::eParamPreset_1_33, tuttle::plugin::crop::eParamPreset_1_77, tuttle::plugin::crop::eParamPreset_1_85, tuttle::plugin::crop::eParamPreset_2_35, tuttle::plugin::crop::eParamPreset_2_40, tuttle::plugin::crop::eParamPreset_custom, tuttle::plugin::crop::eParamSymmetricX, tuttle::plugin::crop::eParamSymmetricXY, tuttle::plugin::crop::eParamSymmetricY, getCropRegionValue(), OFX::DoubleParam::getValue(), OFX::ChoiceParam::getValue(), OFX::BooleanParam::getValue(), tuttle::plugin::crop::kParamAxis, tuttle::plugin::crop::kParamFixedRatio, tuttle::plugin::crop::kParamPreset, tuttle::plugin::crop::kParamRatio, tuttle::plugin::crop::kParamSymmetric, tuttle::plugin::crop::kParamXMax, tuttle::plugin::crop::kParamXMin, tuttle::plugin::crop::kParamYMax, tuttle::plugin::crop::kParamYMin, OFX::Param::setEnabled(), OFX::Param::setIsSecretAndDisabled(), OFX::IntParam::setValue(), OFX::DoubleParam::setValue(), OFX::ChoiceParam::setValue(), OFX::InstanceChangedArgs::time, OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.

Referenced by changedClip(), and CropPlugin().

Here is the call graph for this function:

OfxRectI tuttle::plugin::crop::CropPlugin::getCropRegionValue ( ) const

Definition at line 45 of file CropPlugin.cpp.

References _paramXMax, _paramXMin, _paramYMax, _paramYMin, OFX::IntParam::getValue(), OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.

Referenced by changedParam(), and computeCropRegion().

Here is the call graph for this function:

bool tuttle::plugin::crop::CropPlugin::getRegionOfDefinition ( const OFX::RegionOfDefinitionArguments args,
OfxRectD rod 
) [virtual]

The get RoD action.

If the effect wants change the rod from the default value (which is the union of RoD's of all input clips) it should set the rod argument and return true.

This is all in cannonical coordinates.

Reimplemented from OFX::ImageEffect.

Definition at line 374 of file CropPlugin.cpp.

References tuttle::plugin::crop::CropProcessParams< Pixel >::_cropRegion, _paramMode, tuttle::plugin::crop::eParamModeCrop, tuttle::plugin::crop::eParamModeFillColor, getProcessParams(), OFX::ChoiceParam::getValue(), OFX::RegionOfDefinitionArguments::time, OfxRectI::x1, OfxRectD::x1, OfxRectI::x2, OfxRectD::x2, OfxRectI::y1, OfxRectD::y1, OfxRectI::y2, and OfxRectD::y2.

Here is the call graph for this function:

void tuttle::plugin::crop::CropPlugin::render ( const OFX::RenderArguments args) [virtual]

The overridden render function.

Parameters:
[in]argsRendering parameters

Implements OFX::ImageEffect.

Definition at line 404 of file CropPlugin.cpp.

int tuttle::plugin::crop::CropPlugin::safeModulo ( const int &  cropValue,
const int &  rodValue 
) [static, private]

Definition at line 56 of file CropPlugin.cpp.

Referenced by computeCropRegion().


Field Documentation


The documentation for this class was generated from the following files: