Blame toonz/sources/include/tbrush.h
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
// tbrush.h: class to define an abstract brush
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TBRUSH_H
|
|
Toshihiro Shimizu |
890ddd |
#define TBRUSH_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifdef PER_VECCHIO_ELLIPTIC_BRUSH
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tcommon.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TVRENDER_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 |
// forward declaration
|
|
Toshihiro Shimizu |
890ddd |
class TStroke;
|
|
Toshihiro Shimizu |
890ddd |
class TStrokeOutline;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//---------------------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TBrush
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
class OutlineParameter
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
/*double m_pixelSize;*/
|
|
Toshihiro Shimizu |
890ddd |
double m_lengthStep; // max lengthStep (sulla centerline) per la
|
|
Toshihiro Shimizu |
890ddd |
// linearizzazione dell'outline
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
OutlineParameter(/*double pixelSize,*/ double lengthStep = 0)
|
|
Toshihiro Shimizu |
890ddd |
/*: m_pixelSize(pixelSize)*/
|
|
Toshihiro Shimizu |
890ddd |
: m_lengthStep(lengthStep)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TBrush() {}
|
|
Toshihiro Shimizu |
890ddd |
virtual ~TBrush() {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
virtual void makeOutline(const TStroke &stroke,
|
|
Toshihiro Shimizu |
890ddd |
TStrokeOutline &outline,
|
|
Toshihiro Shimizu |
890ddd |
const OutlineParameter ¶m) = 0;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
virtual void draw() = 0;
|
|
Toshihiro Shimizu |
890ddd |
virtual TBrush *clone() = 0;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
#endif //PER_VECCHIO_ELLIPTIC_BRUSH
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif // TBRUSH_H
|