18#ifndef STROKEINTERPOLATOR_H
19#define STROKEINTERPOLATOR_H
37 void setPressure(
float pressure);
38 void setStabilizerLevel(
int level);
40 float getPressure() {
return mTabletPressure; }
41 int getStabilizerLevel() {
return mStabilizerLevel; }
42 bool isActive()
const {
return mStrokeStarted; }
45 void interpolatePoll();
47 void interpolatePollAndPaint();
48 void interpolateEnd();
49 void smoothMousePos(
QPointF pos);
54 QPointF getCurrentPixel()
const {
return mCurrentPixel; }
55 QPointF getLastPixel()
const {
return mLastPixel; }
56 QPointF getLastMeanPixel()
const {
return mLastInterpolated; }
57 QPointF getCurrentPressPixel()
const {
return mCurrentPressPixel; }
60 static const int STROKE_QUEUE_LENGTH = 3;
64 float pressure = 1.0f;
70 QPointF mCurrentPressPixel = { 0, 0 };
71 QPointF mCurrentPixel = { 0, 0 };
73 QPointF mLastInterpolated = { 0, 0 };
76 bool mHasTangent =
false;
77 bool mStrokeStarted =
false;
78 bool mTabletInUse =
false;
79 float mTabletPressure = 1.f;
80 int mStabilizerLevel = 0;
virtual bool event(QEvent *e)