tahoma2d/toonz/sources/tnzext/StrokeStatus.cpp

60 lines
1.5 KiB
C++
Raw Normal View History

2016-03-19 06:57:51 +13:00
#include "ext/StrokeStatus.h"
#include "tgeometry.h"
#include "tvectorimage.h"
#include "ext/Types.h"
#include "ext/StrokeParametricDeformer.h"
#include <vector>
2016-06-15 18:43:10 +12:00
namespace ToonzExt {
2016-03-19 06:57:51 +13:00
//---------------------------------------------------------------------------
/**
*@class StrokeStatus
*@brief This class mantains interal data for Dragger manipulator.
*/
2016-06-15 18:43:10 +12:00
StrokeStatus::StrokeStatus(TStroke *stroke2change, unsigned int n, double w,
double strokeLength)
: stroke2change_(stroke2change)
, n_(n)
, w_(w)
, strokeLength_(strokeLength) {}
2016-03-19 06:57:51 +13:00
//---------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
StrokeStatus::StrokeStatus() {}
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
StrokeStatus::~StrokeStatus() {}
2016-03-19 06:57:51 +13:00
//---------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
TStroke *StrokeStatus::getItself() const { return stroke2change_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
double StrokeStatus::getW() const { return w_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
unsigned int StrokeStatus::getId() const { return n_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
double StrokeStatus::getLength() const { return strokeLength_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void StrokeStatus::setItself(TStroke *s) { stroke2change_ = s; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void StrokeStatus::setW(double w) { w_ = w; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void StrokeStatus::setId(unsigned int n) { n_ = n; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void StrokeStatus::setLength(double l) { strokeLength_ = l; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void StrokeStatus::init() {
n_ = -1;
w_ = -1;
stroke2change_ = 0;
strokeLength_ = -1;
2016-03-19 06:57:51 +13:00
}
//---------------------------------------------------------------------------
}