tahoma2d/toonz/sources/stdfx/bright_contfx.h

38 lines
909 B
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef BRIGHTCONTFX_H
#define BRIGHTCONTFX_H
#include "stdfx.h"
2016-06-15 18:43:10 +12:00
class Bright_ContFx : public TStandardRasterFx, public TDoubleParamObserver {
FX_PLUGIN_DECLARATION(Bright_ContFx)
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TRasterFxPort m_input;
TDoubleParamP m_bright;
TDoubleParamP m_contrast;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
Bright_ContFx() : m_bright(127.5), m_contrast(50.0) {
addParam("brightness", m_bright);
addParam("contrast", m_contrast);
m_bright->setValueRange(0, 255);
m_contrast->setValueRange(0, 100);
addPort("Source", m_input);
}
~Bright_ContFx(){};
// TParamObserver method
void onChange(const TParamChange &change) { notify(TFxParamChange(change)); }
bool getBBox(double frame, TRectD &bBox, TPixel32 &bgColor) {
return m_input->getBBox(frame, bBox, bgColor);
};
void compute(TTile &tile, double frame, const TRasterFxRenderInfo *);
TRect getInvalidRect(const TRect &max);
2016-03-19 06:57:51 +13:00
};
#endif