|
Krita Source Code Documentation
|
#include <kis_speed_smoother.h>
Classes | |
| struct | Private |
Public Member Functions | |
| void | clear () |
| qreal | getNextSpeed (const QPointF &pt, ulong timestamp) |
| KisSpeedSmoother () | |
| qreal | lastSpeed () const |
| void | updateSettings () |
| ~KisSpeedSmoother () | |
Private Member Functions | |
| qreal | getNextSpeedImpl (const QPointF &pt, qreal time) |
Private Attributes | |
| const QScopedPointer< Private > | m_d |
Definition at line 15 of file kis_speed_smoother.h.
| KisSpeedSmoother::KisSpeedSmoother | ( | ) |
Definition at line 66 of file kis_speed_smoother.cpp.
References updateSettings().
| KisSpeedSmoother::~KisSpeedSmoother | ( | ) |
Definition at line 72 of file kis_speed_smoother.cpp.
| void KisSpeedSmoother::clear | ( | ) |
| qreal KisSpeedSmoother::getNextSpeed | ( | const QPointF & | pt, |
| ulong | timestamp ) |
Definition at line 81 of file kis_speed_smoother.cpp.
References getNextSpeedImpl(), and m_d.
|
private |
Mind you, we don't care about the specific timestamps of the tablet events! They are not reliable. Instead, we are trying to estimate the sample rate of the tablet itself using the filtered mean accumulator. It works in an assumption that all the tablets generate events at a fixed sample rate.
Definition at line 107 of file kis_speed_smoother.cpp.
References kisDistance(), m_d, and MIN_TRACKING_DISTANCE.
| qreal KisSpeedSmoother::lastSpeed | ( | ) | const |
Definition at line 76 of file kis_speed_smoother.cpp.
References m_d.
| void KisSpeedSmoother::updateSettings | ( | ) |
Definition at line 99 of file kis_speed_smoother.cpp.
References m_d, and KisConfig::readEntry().
|
private |
Definition at line 31 of file kis_speed_smoother.h.