|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TTZPIMAGEFX_H
|
|
Toshihiro Shimizu |
890ddd |
#define TTZPIMAGEFX_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// TnzCore includes
|
|
Toshihiro Shimizu |
890ddd |
#include "tpalette.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "trastercm.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// TnzBase includes
|
|
Toshihiro Shimizu |
890ddd |
#include "trasterfxrenderdata.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// TnzExt includes
|
|
Toshihiro Shimizu |
890ddd |
#include "ext/plasticskeletondeformation.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// STD includes
|
|
Toshihiro Shimizu |
890ddd |
#include <vector></vector>
|
|
Toshihiro Shimizu |
890ddd |
#include <set></set>
|
|
Toshihiro Shimizu |
890ddd |
#include <string></string>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TFX_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//**********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
// ExternalPaletteFxRenderData declaration
|
|
Toshihiro Shimizu |
890ddd |
//**********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI ExternalPaletteFxRenderData : public TRasterFxRenderData {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TPaletteP m_palette;
|
|
Shinya Kitaoka |
120a6e |
std::string m_name;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
ExternalPaletteFxRenderData(TPaletteP palette, const std::string &name);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
float typeIndex() const override { return 0.0f; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool operator==(const TRasterFxRenderData &data) const override;
|
|
Shinya Kitaoka |
473e70 |
std::string toString() const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//**********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
// PaletteFilterFxRenderData declaration
|
|
Toshihiro Shimizu |
890ddd |
//**********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
enum FilterType {
|
|
Shinya Kitaoka |
120a6e |
eApplyToInksAndPaints = 0,
|
|
Shinya Kitaoka |
120a6e |
eApplyToInksKeepingAllPaints,
|
|
Shinya Kitaoka |
120a6e |
eApplyToPaintsKeepingAllInks,
|
|
Shinya Kitaoka |
120a6e |
eApplyToInksAndPaints_NoGap,
|
|
Shinya Kitaoka |
120a6e |
eApplyToInksDeletingAllPaints,
|
|
Shinya Kitaoka |
120a6e |
eApplyToPaintsDeletingAllInks
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//------------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI PaletteFilterFxRenderData : public TRasterFxRenderData {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
bool m_keep;
|
|
Shinya Kitaoka |
120a6e |
FilterType m_type;
|
|
Shinya Kitaoka |
120a6e |
std::set<int> m_colors;</int>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
PaletteFilterFxRenderData();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
float typeIndex() const override {
|
|
Shinya Kitaoka |
120a6e |
return (m_type == eApplyToInksAndPaints) ? 0.5f : 1.0f;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool operator==(const TRasterFxRenderData &data) const override;
|
|
Shinya Kitaoka |
473e70 |
std::string toString() const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//------------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void DVAPI insertIndexes(std::vector<std::string> items,</std::string>
|
|
Shinya Kitaoka |
120a6e |
PaletteFilterFxRenderData *t);
|
|
Shinya Kitaoka |
3bfa54 |
void DVAPI parseIndexes(std::string indexes, std::vector<std::string> &items);</std::string>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//**********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
// SandorFxRenderData (possible) parameters
|
|
Toshihiro Shimizu |
890ddd |
//**********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
enum Type { BlendTz, Calligraphic, ArtAtContour, OutBorder };
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//------------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI BlendTzParams {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
std::wstring m_colorIndex;
|
|
Shinya Kitaoka |
120a6e |
bool m_noBlending;
|
|
Shinya Kitaoka |
120a6e |
double m_amount;
|
|
Shinya Kitaoka |
120a6e |
double m_smoothness;
|
|
Shinya Kitaoka |
120a6e |
int m_superSampling;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
BlendTzParams()
|
|
Shinya Kitaoka |
120a6e |
: m_colorIndex(L"")
|
|
Shinya Kitaoka |
120a6e |
, m_noBlending(false)
|
|
Shinya Kitaoka |
120a6e |
, m_amount(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_smoothness(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_superSampling(0) {}
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//------------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI CalligraphicParams {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
std::wstring m_colorIndex;
|
|
Shinya Kitaoka |
120a6e |
double m_thickness;
|
|
Shinya Kitaoka |
120a6e |
double m_horizontal;
|
|
Shinya Kitaoka |
120a6e |
double m_vertical;
|
|
Shinya Kitaoka |
120a6e |
double m_upWDiagonal;
|
|
Shinya Kitaoka |
120a6e |
double m_doWDiagonal;
|
|
Shinya Kitaoka |
120a6e |
double m_accuracy;
|
|
Shinya Kitaoka |
120a6e |
double m_noise;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
CalligraphicParams()
|
|
Shinya Kitaoka |
120a6e |
: m_thickness(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_horizontal(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_vertical(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_upWDiagonal(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_doWDiagonal(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_accuracy(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_noise(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_colorIndex(L"") {}
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//------------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI ArtAtContourParams {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
double m_maxSize;
|
|
Shinya Kitaoka |
120a6e |
double m_minSize;
|
|
Shinya Kitaoka |
120a6e |
double m_maxOrientation;
|
|
Shinya Kitaoka |
120a6e |
double m_minOrientation;
|
|
Shinya Kitaoka |
120a6e |
bool m_randomness;
|
|
Shinya Kitaoka |
120a6e |
double m_maxDistance;
|
|
Shinya Kitaoka |
120a6e |
double m_minDistance;
|
|
Shinya Kitaoka |
120a6e |
double m_density;
|
|
Shinya Kitaoka |
120a6e |
bool m_keepLine;
|
|
Shinya Kitaoka |
120a6e |
bool m_keepColor;
|
|
Shinya Kitaoka |
120a6e |
bool m_includeAlpha;
|
|
Shinya Kitaoka |
120a6e |
std::wstring m_colorIndex;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
ArtAtContourParams()
|
|
Shinya Kitaoka |
120a6e |
: m_maxSize(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_minSize(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_maxOrientation(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_minOrientation(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_randomness(false)
|
|
Shinya Kitaoka |
120a6e |
, m_maxDistance(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_minDistance(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_density(0.0)
|
|
Shinya Kitaoka |
120a6e |
, m_keepLine(false)
|
|
Shinya Kitaoka |
120a6e |
, m_keepColor(false)
|
|
Shinya Kitaoka |
120a6e |
, m_includeAlpha(true)
|
|
Shinya Kitaoka |
120a6e |
, m_colorIndex(L"") {}
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//**********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
// SandorFxRenderData declaration
|
|
Toshihiro Shimizu |
890ddd |
//**********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI SandorFxRenderData : public TRasterFxRenderData {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
Type m_type;
|
|
Shinya Kitaoka |
120a6e |
BlendTzParams m_blendParams;
|
|
Shinya Kitaoka |
120a6e |
CalligraphicParams m_callParams;
|
|
Shinya Kitaoka |
120a6e |
ArtAtContourParams m_contourParams;
|
|
Shinya Kitaoka |
120a6e |
int m_border, m_shrink;
|
|
Shinya Kitaoka |
120a6e |
int m_argc;
|
|
Shinya Kitaoka |
120a6e |
const char *m_argv[12];
|
|
Shinya Kitaoka |
120a6e |
TRectD m_controllerBBox;
|
|
Shinya Kitaoka |
120a6e |
TRasterP m_controller;
|
|
Shinya Kitaoka |
120a6e |
std::string m_controllerAlias;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
SandorFxRenderData(Type type, int argc, const char *argv[], int border,
|
|
Shinya Kitaoka |
120a6e |
int shrink, const TRectD &controllerBBox = TRectD(),
|
|
Shinya Kitaoka |
120a6e |
const TRasterP &controller = TRasterP());
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
float typeIndex() const override { return (m_type == BlendTz) ? 2.0f : 3.0f; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool operator==(const TRasterFxRenderData &data) const override;
|
|
Shinya Kitaoka |
473e70 |
std::string toString() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TRectD getBBoxEnlargement(const TRectD &bbox) override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|