|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "ext/InterfaceStatus.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tgeometry.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tvectorimage.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "ext/Types.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "ext/StrokeParametricDeformer.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include <vector></vector>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
namespace ToonzExt {
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//---------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
InterfaceStatus::InterfaceStatus() {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
InterfaceStatus::InterfaceStatus(const TPointD &curr, const TPointD &prev,
|
|
Shinya Kitaoka |
120a6e |
const TPointD &down, double lengthOfAction,
|
|
Shinya Kitaoka |
120a6e |
double deformerSensibility, double pixelSize,
|
|
Shinya Kitaoka |
120a6e |
int cornerSize)
|
|
Shinya Kitaoka |
120a6e |
: curr_(curr)
|
|
Shinya Kitaoka |
120a6e |
, prev_(prev)
|
|
Shinya Kitaoka |
120a6e |
, down_(down)
|
|
Shinya Kitaoka |
120a6e |
, lengthOfAction_(lengthOfAction)
|
|
Shinya Kitaoka |
120a6e |
, deformerSensibility_(deformerSensibility)
|
|
Shinya Kitaoka |
120a6e |
, pixelSize_(pixelSize)
|
|
Shinya Kitaoka |
120a6e |
, cornerSize_(cornerSize) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
InterfaceStatus::~InterfaceStatus() {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
double InterfaceStatus::getDeformationLength() const { return lengthOfAction_; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void InterfaceStatus::setDeformationLength(double val) {
|
|
Shinya Kitaoka |
120a6e |
lengthOfAction_ = val;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
double InterfaceStatus::getSensibility() const { return deformerSensibility_; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void InterfaceStatus::setSensibility(double val) { deformerSensibility_ = val; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
double InterfaceStatus::getPixelSize() const { return pixelSize_; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void InterfaceStatus::setPixelSize(double val) { pixelSize_ = val; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int InterfaceStatus::getCornerSize() const { return cornerSize_; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void InterfaceStatus::setCornerSize(int val) { cornerSize_ = val; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void InterfaceStatus::init() {
|
|
Shinya Kitaoka |
120a6e |
curr_ = prev_ = down_ = TPointD(-1, -1);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
lengthOfAction_ = -1;
|
|
Shinya Kitaoka |
120a6e |
deformerSensibility_ = -1;
|
|
Shinya Kitaoka |
120a6e |
pixelSize_ = 1;
|
|
Shinya Kitaoka |
120a6e |
cornerSize_ = 120;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
//---------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
}
|