tahoma2d/toonz/sources/include/tbrush.h

55 lines
1.3 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
//-----------------------------------------------------------------------------
// tbrush.h: class to define an abstract brush
//-----------------------------------------------------------------------------
#ifndef TBRUSH_H
#define TBRUSH_H
#ifdef PER_VECCHIO_ELLIPTIC_BRUSH
#include "tcommon.h"
#undef DVAPI
#undef DVVAR
#ifdef TVRENDER_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
// forward declaration
class TStroke;
class TStrokeOutline;
//---------------------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
class DVAPI TBrush {
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
class OutlineParameter {
public:
/*double m_pixelSize;*/
double m_lengthStep; // max lengthStep (sulla centerline) per la
// linearizzazione dell'outline
OutlineParameter(/*double pixelSize,*/ double lengthStep = 0)
/*: m_pixelSize(pixelSize)*/
: m_lengthStep(lengthStep) {}
};
TBrush() {}
virtual ~TBrush() {}
virtual void makeOutline(const TStroke &stroke, TStrokeOutline &outline,
const OutlineParameter &param) = 0;
virtual void draw() = 0;
virtual TBrush *clone() = 0;
2016-03-19 06:57:51 +13:00
};
2016-06-15 18:43:10 +12:00
#endif // PER_VECCHIO_ELLIPTIC_BRUSH
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
#endif // TBRUSH_H