![]() |
Cinder
0.9.1
|
#include <Channel.h>
Public Member Functions | |
Iter (ChannelT< T > &channelT, const Area &area) | |
T & | v () const |
T & | v (int32_t xOff, int32_t yOff) 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 () |
Convenience class for iterating the pixels of a Channel.
cinder::ChannelT< T >::Iter::Iter | ( | ChannelT< T > & | channelT, |
const Area & | area | ||
) |
T& cinder::ChannelT< T >::Iter::v | ( | ) | const |
Returns a reference to the value of the pixel that the Iter currently points to.
T& cinder::ChannelT< T >::Iter::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.
T& cinder::ChannelT< T >::Iter::vClamped | ( | int32_t | xOff, |
int32_t | yOff | ||
) | const |
const int32_t cinder::ChannelT< T >::Iter::x | ( | ) | const |
Returns the x coordinate of the pixel the Iter currently points to.
const int32_t cinder::ChannelT< T >::Iter::y | ( | ) | const |
Returns the y coordinate of the pixel the Iter currently points to.
ivec2 cinder::ChannelT< T >::Iter::getPos | ( | ) | const |
Returns the coordinate of the pixel the Iter currently points to.
bool cinder::ChannelT< T >::Iter::pixel | ( | ) |
Increments which pixel of the current row the Iter points to, and returns false
when no pixels remain in the current row.
bool cinder::ChannelT< T >::Iter::line | ( | ) |
Increments which row the Iter points to, and returns false
when no rows remain in the Channel.
int32_t cinder::ChannelT< T >::Iter::getWidth | ( | ) |
int32_t cinder::ChannelT< T >::Iter::getHeight | ( | ) |