tahoma2d/toonz/sources/include/tautoclose.h

49 lines
887 B
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef _TAUTOCLOSE_H_
#define _TAUTOCLOSE_H_
#include "tgeometry.h"
#include "traster.h"
#undef DVAPI
#undef DVVAR
#ifdef TROP_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
2016-06-15 18:43:10 +12:00
class TAutocloser {
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
typedef std::pair<TPoint, TPoint> Segment;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TAutocloser(const TRasterP &r);
~TAutocloser();
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
// if this function is never used, use default values
void setClosingDistance(int d);
int getClosingDistance() const;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void setSpotAngle(double degrees);
double getSpotAngle() const;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void setInkIndex(int inkIndex);
int getInkIndex() const;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void compute(vector<Segment> &closingSegmentArray);
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
class Imp;
Imp *m_imp;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
// not implemented
TAutocloser();
TAutocloser(const TAutocloser &a);
TAutocloser &operator=(const TAutocloser &a);
2016-03-19 06:57:51 +13:00
};
#endif