Blame toonz/sources/stdfx/bright_contfx.h
|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef BRIGHTCONTFX_H
|
|
Toshihiro Shimizu |
890ddd |
#define BRIGHTCONTFX_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "stdfx.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class Bright_ContFx : public TStandardRasterFx, public TDoubleParamObserver {
|
|
Shinya Kitaoka |
120a6e |
FX_PLUGIN_DECLARATION(Bright_ContFx)
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TRasterFxPort m_input;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP m_bright;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP m_contrast;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
Bright_ContFx() : m_bright(127.5), m_contrast(50.0) {
|
|
Shinya Kitaoka |
120a6e |
addParam("brightness", m_bright);
|
|
Shinya Kitaoka |
120a6e |
addParam("contrast", m_contrast);
|
|
Shinya Kitaoka |
120a6e |
m_bright->setValueRange(0, 255);
|
|
Shinya Kitaoka |
120a6e |
m_contrast->setValueRange(0, 100);
|
|
Shinya Kitaoka |
120a6e |
addPort("Source", m_input);
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
~Bright_ContFx(){};
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
// TParamObserver method
|
|
Shinya Kitaoka |
120a6e |
void onChange(const TParamChange &change) { notify(TFxParamChange(change)); }
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
bool getBBox(double frame, TRectD &bBox, TPixel32 &bgColor) {
|
|
Shinya Kitaoka |
120a6e |
return m_input->getBBox(frame, bBox, bgColor);
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void compute(TTile &tile, double frame, const TRasterFxRenderInfo *);
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
TRect getInvalidRect(const TRect &max);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
#endif
|