|
Toshihiro Shimizu |
890ddd |
#ifndef ino_common_h
|
|
Toshihiro Shimizu |
890ddd |
#define ino_common_h
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "trop.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "trasterfx.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "stdfx.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
namespace ino
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
/* 一時バッファとの変換機能 */
|
|
Toshihiro Shimizu |
890ddd |
void ras_to_arr(
|
|
Toshihiro Shimizu |
890ddd |
const TRasterP in_ras, const int channels, unsigned char *out_arr);
|
|
Toshihiro Shimizu |
890ddd |
void arr_to_ras(
|
|
Toshihiro Shimizu |
890ddd |
const unsigned char *in_arr, const int channels, TRasterP out_ras, const int margin);
|
|
Toshihiro Shimizu |
890ddd |
void ras_to_vec(
|
|
Toshihiro Shimizu |
890ddd |
const TRasterP ras, const int channels, std::vector<unsigned char=""> &vec);</unsigned>
|
|
Toshihiro Shimizu |
890ddd |
void vec_to_ras(
|
|
Toshihiro Shimizu |
890ddd |
std::vector<unsigned char=""> &vec, const int channels, TRasterP ras, const int margin = 0);</unsigned>
|
|
Toshihiro Shimizu |
890ddd |
// void Lx_to_wrap( TRasterP ras );
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* logのserverアクセスON/OFF,install時設定をするための機能 */
|
|
Toshihiro Shimizu |
890ddd |
/* TEnv::getConfigDir() + "fx_ino_no_log.setup"
|
|
Toshihiro Shimizu |
890ddd |
が存在するとtrueを返す */
|
|
Toshihiro Shimizu |
890ddd |
bool log_enable_sw(void);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* toonz6.0.x専用の固定値を返すinline(埋め込み)関数 */
|
|
Toshihiro Shimizu |
890ddd |
inline double param_range(void) { return 1.0; } // 1 or 100%
|
|
Toshihiro Shimizu |
890ddd |
inline int channels(void) { return 4; } // RGBM is 4 channels
|
|
Toshihiro Shimizu |
890ddd |
inline int bits(const TRasterP ras)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
return ((TRaster64P)ras) ? (std::numeric_limits<unsigned short="">::digits) : (std::numeric_limits<unsigned char="">::digits);</unsigned></unsigned>
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
inline int pixel_bits(const TRasterP ras)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
return ino::channels() * ino::bits(ras);
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
//inline double pixel_per_mm(void) { return 640. / 12. / 25.4; }
|
|
Toshihiro Shimizu |
890ddd |
inline double pixel_per_mm(void) { return 1.; }
|
|
Toshihiro Shimizu |
890ddd |
// inline double pixel_per_inch(void) { return 640. / 12.; }
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class TBlendForeBackRasterFx : public TRasterFx
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
/* FX nodeが無効のときの、表示port番号 */
|
|
Toshihiro Shimizu |
890ddd |
int getPreferredInputPort() { return 1; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
string getPluginId() const { return PLUGIN_PREFIX; }
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif /* !ino_common_h */
|