tahoma2d/toonz/sources/tnzext/InterfaceStatus.cpp

61 lines
1.7 KiB
C++
Raw Normal View History

2016-03-19 06:57:51 +13:00
#include "ext/InterfaceStatus.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
//---------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
InterfaceStatus::InterfaceStatus() {}
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
InterfaceStatus::InterfaceStatus(const TPointD &curr, const TPointD &prev,
const TPointD &down, double lengthOfAction,
double deformerSensibility, double pixelSize,
int cornerSize)
: curr_(curr)
, prev_(prev)
, down_(down)
, lengthOfAction_(lengthOfAction)
, deformerSensibility_(deformerSensibility)
, pixelSize_(pixelSize)
, cornerSize_(cornerSize) {}
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
InterfaceStatus::~InterfaceStatus() {}
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
double InterfaceStatus::getDeformationLength() const { return lengthOfAction_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void InterfaceStatus::setDeformationLength(double val) {
lengthOfAction_ = val;
2016-03-19 06:57:51 +13:00
}
2016-06-15 18:43:10 +12:00
double InterfaceStatus::getSensibility() const { return deformerSensibility_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void InterfaceStatus::setSensibility(double val) { deformerSensibility_ = val; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
double InterfaceStatus::getPixelSize() const { return pixelSize_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void InterfaceStatus::setPixelSize(double val) { pixelSize_ = val; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int InterfaceStatus::getCornerSize() const { return cornerSize_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void InterfaceStatus::setCornerSize(int val) { cornerSize_ = val; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void InterfaceStatus::init() {
curr_ = prev_ = down_ = TPointD(-1, -1);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
lengthOfAction_ = -1;
deformerSensibility_ = -1;
pixelSize_ = 1;
cornerSize_ = 120;
2016-03-19 06:57:51 +13:00
}
//---------------------------------------------------------------------------
}