Blame toonz/sources/stdfx/iwa_textfx.h
|
shun-iwasawa |
5b2332 |
#pragma once
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
#ifndef IWA_TEXTFX_H
|
|
shun-iwasawa |
5b2332 |
#define IWA_TEXTFX_H
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
#include "tparamset.h"
|
|
shun-iwasawa |
5b2332 |
#include "textawarebasefx.h"
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
//******************************************************************
|
|
shun-iwasawa |
5b2332 |
// Iwa_Text Fx class
|
|
shun-iwasawa |
5b2332 |
//******************************************************************
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
class Iwa_TextFx final : public TextAwareBaseFx {
|
|
shun-iwasawa |
5b2332 |
FX_PLUGIN_DECLARATION(Iwa_TextFx)
|
|
shun-iwasawa |
5b2332 |
protected:
|
|
shun-iwasawa |
5b2332 |
TStringParamP m_text;
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
TIntEnumParamP m_hAlign;
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
TPointParamP m_center;
|
|
shun-iwasawa |
5b2332 |
TDoubleParamP m_width;
|
|
shun-iwasawa |
5b2332 |
TDoubleParamP m_height;
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
TFontParamP m_font;
|
|
shun-iwasawa |
5b2332 |
TPixelParamP m_textColor;
|
|
shun-iwasawa |
5b2332 |
TPixelParamP m_boxColor;
|
|
shun-iwasawa |
5b2332 |
TBoolParamP m_showBorder;
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
template <typename pixel="" raster,="" typename=""></typename>
|
|
shun-iwasawa |
5b2332 |
void putTextImage(const RASTER srcRas, TPoint &pos, QImage &img);
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
public:
|
|
shun-iwasawa |
5b2332 |
Iwa_TextFx();
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
bool canHandle(const TRenderSettings &info, double frame) override {
|
|
shun-iwasawa |
5b2332 |
return true;
|
|
shun-iwasawa |
5b2332 |
}
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
bool doGetBBox(double frame, TRectD &bBox,
|
|
shun-iwasawa |
5b2332 |
const TRenderSettings &ri) override;
|
|
shun-iwasawa |
5b2332 |
void doCompute(TTile &tile, double frame, const TRenderSettings &ri) override;
|
|
shun-iwasawa |
5b2332 |
void getParamUIs(TParamUIConcept *&concepts, int &length) override;
|
|
shun-iwasawa |
5b2332 |
|
|
shun-iwasawa |
5b2332 |
std::string getAlias(double frame,
|
|
shun-iwasawa |
5b2332 |
const TRenderSettings &info) const override;
|
|
shun-iwasawa |
5b2332 |
};
|
|
shun-iwasawa |
5b2332 |
#endif
|