Cinder  0.9.1
Public Member Functions | List of all members
cinder::ChannelT< T >::ConstIter Class Reference

#include <Channel.h>

Public Member Functions

 ConstIter (const ChannelT< T > &channelT, const Area &area)
 
const T & v () const
 
const T & v (int32_t xOff, int32_t yOff) const
 
const T & vClamped (int32_t xOff, int32_t yOff) const
 
const int32_t x () const
 
const int32_t y () const
 
ivec2 getPos () const
 
bool pixel ()
 
bool line ()
 
int32_t getWidth ()
 
int32_t getHeight ()
 

Detailed Description

template<typename T>
class cinder::ChannelT< T >::ConstIter

Convenience class for iterating the pixels of a Channel. The iteration is const, performing read-only operations on the Channel.

Constructor & Destructor Documentation

template<typename T>
cinder::ChannelT< T >::ConstIter::ConstIter ( const ChannelT< T > &  channelT,
const Area area 
)

Member Function Documentation

template<typename T>
const T& cinder::ChannelT< T >::ConstIter::v ( ) const

Returns a reference to the value of the pixel that the Iter currently points to.

template<typename T>
const T& cinder::ChannelT< T >::ConstIter::v ( int32_t  xOff,
int32_t  yOff 
) const

Returns a reference to the value of the pixel that the Iter currently points to, offset by (xOff, yOff) pixels.

template<typename T>
const T& cinder::ChannelT< T >::ConstIter::vClamped ( int32_t  xOff,
int32_t  yOff 
) const

Returns a reference to the value of the pixel that the Iter currently points to, offset by (xOff, yOff) pixels. Clamps offset to the bounds of the Iter.

template<typename T>
const int32_t cinder::ChannelT< T >::ConstIter::x ( ) const

Returns the x coordinate of the pixel the Iter currently points to.

template<typename T>
const int32_t cinder::ChannelT< T >::ConstIter::y ( ) const

Returns the y coordinate of the pixel the Iter currently points to.

template<typename T>
ivec2 cinder::ChannelT< T >::ConstIter::getPos ( ) const

Returns the coordinate of the pixel the Iter currently points to.

template<typename T>
bool cinder::ChannelT< T >::ConstIter::pixel ( )

Increments which pixel of the current row the Iter points to, and returns false when no pixels remain in the current row.

template<typename T>
bool cinder::ChannelT< T >::ConstIter::line ( )

Increments which row the Iter points to, and returns false when no rows remain in the Channel.

template<typename T>
int32_t cinder::ChannelT< T >::ConstIter::getWidth ( )

Returns the width of the Area the Iter iterates.

template<typename T>
int32_t cinder::ChannelT< T >::ConstIter::getHeight ( )

Returns the height of the Area the Iter iterates.


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