Pencil2D  ff90c0872e88be3bf81c548cd60f01983012ec49
Pencil2D is an animation software for both bitmap and vector graphics. It is free, multi-platform, and open source.
 All Classes Functions
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
StrokeManager Class Reference
+ Inheritance diagram for StrokeManager:

Public Member Functions

void tabletEvent (QTabletEvent *event)
 
void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void setPressure (float pressure)
 
void setInpolLevel (int level)
 
float getPressure ()
 
int getInpolLevel ()
 
bool isTabletInUse ()
 
QList< QPointF > interpolateStroke ()
 
void interpolatePoll ()
 
QPointF interpolateStart (QPointF firstPoint)
 
void interpolatePollAndPaint ()
 
void interpolateEnd ()
 
void smoothMousePos (QPointF pos)
 
QList< QPointF > meanInpolOp (QList< QPointF > points, qreal x, qreal y, qreal pressure)
 
QList< QPointF > noInpolOp (QList< QPointF > points)
 
QList< QPointF > tangentInpolOp (QList< QPointF > points)
 
QPointF getLastPressPixel () const
 
QPointF getCurrentPixel () const
 
QPointF getLastPixel () const
 
QPointF getLastMeanPixel () const
 
QPointF getMousePos () const
 

Private Member Functions

void reset ()
 
QPointF getEventPosition (QMouseEvent *)
 

Private Attributes

float pressure = 1.0f
 
QQueue< QPointF > strokeQueue
 
QQueue< qreal > pressureQueue
 
QTimer timer
 
QTime mSingleshotTime
 
QPointF mLastPressPixel2 = { 0, 0 }
 
QPointF mLastPressPixel = { 0, 0 }
 
QPointF mCurrentPixel = { 0, 0 }
 
QPointF mLastPixel = { 0, 0 }
 
QPointF mLastInterpolated = { 0, 0 }
 
QPointF mousePos = { 0, 0 }
 
QPointF m_previousTangent
 
bool hasTangent = false
 
int previousTime = 0
 
bool mStrokeStarted = false
 
bool mTabletInUse = false
 
float mTabletPressure = 1.f
 
int mInpolLevel = 0
 
QPointF mTabletPosition
 
qreal mMeanPressure
 
clock_t m_timeshot
 

Static Private Attributes

static const int STROKE_QUEUE_LENGTH = 3
 

Detailed Description

Definition at line 32 of file strokemanager.h.


The documentation for this class was generated from the following files: