Blame toonz/sources/stdfx/changecolorfx.h
|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef CHANGECOLORFX_H
|
|
Toshihiro Shimizu |
890ddd |
#define CHANGECOLORFX_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "stdfx.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class ChangeColorFx : public TStandardRasterFx
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
FX_PLUGIN_DECLARATION(ChangeColorFx)
|
|
Toshihiro Shimizu |
890ddd |
TRasterFxPort m_input;
|
|
Toshihiro Shimizu |
890ddd |
TPixelParamP m_from_color;
|
|
Toshihiro Shimizu |
890ddd |
TPixelParamP m_to_color;
|
|
Toshihiro Shimizu |
890ddd |
TDoubleParamP m_range;
|
|
Toshihiro Shimizu |
890ddd |
TDoubleParamP m_falloff;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
ChangeColorFx()
|
|
Toshihiro Shimizu |
890ddd |
: m_from_color(TPixel32::Red), m_to_color(TPixel32::Blue), m_range(0.0), m_falloff(0.0)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
addPort("Source", m_input);
|
|
Toshihiro Shimizu |
890ddd |
addParam("range", m_range);
|
|
Toshihiro Shimizu |
890ddd |
addParam("falloff", m_falloff);
|
|
Toshihiro Shimizu |
890ddd |
addParam("from_color", m_from_color);
|
|
Toshihiro Shimizu |
890ddd |
addParam("to_color", m_to_color);
|
|
Toshihiro Shimizu |
890ddd |
m_range->setValueRange(0, 1);
|
|
Toshihiro Shimizu |
890ddd |
m_falloff->setValueRange(0, 1);
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
~ChangeColorFx(){};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool getBBox(double frame, TRectD &bBox, TPixel32 &bgColor)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
return m_input->getBBox(frame, bBox, bgColor);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void compute(TTile &tile, double frame, const TRasterFxRenderInfo *ri);
|
|
Toshihiro Shimizu |
890ddd |
TRect getInvalidRect(const TRect &max);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
#endif
|