Krita Source Code Documentation
Loading...
Searching...
No Matches
KisStabilizedEventsSampler::iterator Class Reference

#include <kis_stabilized_events_sampler.h>

+ Inheritance diagram for KisStabilizedEventsSampler::iterator:

Public Member Functions

 iterator ()
 
 iterator (const KisStabilizedEventsSampler *sampler, int index, qreal alpha)
 

Private Member Functions

const KisPaintInformationdereference () const
 
bool equal (iterator const &other) const
 
void increment ()
 

Private Attributes

qreal m_alpha
 
int m_index
 
const KisStabilizedEventsSamplerm_sampler
 

Friends

class boost::iterator_core_access
 

Detailed Description

Definition at line 31 of file kis_stabilized_events_sampler.h.

Constructor & Destructor Documentation

◆ iterator() [1/2]

KisStabilizedEventsSampler::iterator::iterator ( )
inline

◆ iterator() [2/2]

KisStabilizedEventsSampler::iterator::iterator ( const KisStabilizedEventsSampler * sampler,
int index,
qreal alpha )
inline

Definition at line 42 of file kis_stabilized_events_sampler.h.

43 : m_sampler(sampler),
44 m_index(index),
45 m_alpha(alpha) {}

Member Function Documentation

◆ dereference()

const KisPaintInformation & KisStabilizedEventsSampler::iterator::dereference ( ) const
private

Definition at line 68 of file kis_stabilized_events_sampler.cpp.

69{
70 const int k = qFloor(m_alpha * m_index);
71 return k < m_sampler->m_d->realEvents.size() ?
72 m_sampler->m_d->realEvents[k] : m_sampler->m_d->lastPaintInformation;
73}
const QScopedPointer< Private > m_d

References m_alpha, KisStabilizedEventsSampler::m_d, m_index, and m_sampler.

◆ equal()

bool KisStabilizedEventsSampler::iterator::equal ( iterator const & other) const
inlineprivate

Definition at line 54 of file kis_stabilized_events_sampler.h.

54 {
55 return m_index == other.m_index &&
56 m_sampler == other.m_sampler;
57 }

References m_index, and m_sampler.

◆ increment()

void KisStabilizedEventsSampler::iterator::increment ( )
inlineprivate

Definition at line 50 of file kis_stabilized_events_sampler.h.

50 {
51 m_index++;
52 }

Friends And Related Symbol Documentation

◆ boost::iterator_core_access

friend class boost::iterator_core_access
friend

Definition at line 48 of file kis_stabilized_events_sampler.h.

Member Data Documentation

◆ m_alpha

qreal KisStabilizedEventsSampler::iterator::m_alpha
private

Definition at line 64 of file kis_stabilized_events_sampler.h.

◆ m_index

int KisStabilizedEventsSampler::iterator::m_index
private

Definition at line 63 of file kis_stabilized_events_sampler.h.

◆ m_sampler

const KisStabilizedEventsSampler* KisStabilizedEventsSampler::iterator::m_sampler
private

Definition at line 62 of file kis_stabilized_events_sampler.h.


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