![]() |
Cinder
0.9.1
|
#include <Surface.h>
Public Member Functions | |
ConstIter (const Iter &iter) | |
ConstIter (const SurfaceT< T > &SurfaceT, const Area &area) | |
const T & | r () const |
const T & | g () const |
const T & | b () const |
const T & | a () const |
const T & | r (int32_t xOff, int32_t yOff) const |
const T & | g (int32_t xOff, int32_t yOff) const |
const T & | b (int32_t xOff, int32_t yOff) const |
const T & | a (int32_t xOff, int32_t yOff) const |
const T & | rClamped (int32_t xOff, int32_t yOff) const |
const T & | gClamped (int32_t xOff, int32_t yOff) const |
const T & | bClamped (int32_t xOff, int32_t yOff) const |
const T & | aClamped (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 () const |
int32_t | getHeight () const |
Convenience class for iterating the pixels of a Surface. The iteration is const
, performing read-only operations on the Surface.
cinder::SurfaceT< T >::ConstIter::ConstIter | ( | const Iter & | iter | ) |
cinder::SurfaceT< T >::ConstIter::ConstIter | ( | const SurfaceT< T > & | SurfaceT, |
const Area & | area | ||
) |
const T& cinder::SurfaceT< T >::ConstIter::r | ( | ) | const |
Returns a reference to the red value of the pixel that the Iter currently points to.
const T& cinder::SurfaceT< T >::ConstIter::g | ( | ) | const |
Returns a reference to the green value of the pixel that the Iter currently points to.
const T& cinder::SurfaceT< T >::ConstIter::b | ( | ) | const |
Returns a reference to the blue value of the pixel that the Iter currently points to.
const T& cinder::SurfaceT< T >::ConstIter::a | ( | ) | const |
Returns a reference to the alpha value of the pixel that the Iter currently points to. Undefined in the absence of an alpha channel.
const T& cinder::SurfaceT< T >::ConstIter::r | ( | int32_t | xOff, |
int32_t | yOff | ||
) | const |
Returns a reference to the red value of the pixel that the Iter currently points to, offset by (xOff, yOff) pixels.
const T& cinder::SurfaceT< T >::ConstIter::g | ( | int32_t | xOff, |
int32_t | yOff | ||
) | const |
Returns a reference to the green value of the pixel that the Iter currently points to, offset by (xOff, yOff) pixels.
const T& cinder::SurfaceT< T >::ConstIter::b | ( | int32_t | xOff, |
int32_t | yOff | ||
) | const |
Returns a reference to the blue value of the pixel that the Iter currently points to, offset by (xOff, yOff) pixels.
const T& cinder::SurfaceT< T >::ConstIter::a | ( | int32_t | xOff, |
int32_t | yOff | ||
) | const |
Returns a reference to the alpha value of the pixel that the Iter currently points to, offset by (xOff, yOff) pixels.
const T& cinder::SurfaceT< T >::ConstIter::rClamped | ( | int32_t | xOff, |
int32_t | yOff | ||
) | const |
const T& cinder::SurfaceT< T >::ConstIter::gClamped | ( | int32_t | xOff, |
int32_t | yOff | ||
) | const |
const T& cinder::SurfaceT< T >::ConstIter::bClamped | ( | int32_t | xOff, |
int32_t | yOff | ||
) | const |
const T& cinder::SurfaceT< T >::ConstIter::aClamped | ( | int32_t | xOff, |
int32_t | yOff | ||
) | const |
const int32_t cinder::SurfaceT< T >::ConstIter::x | ( | ) | const |
Returns the x coordinate of the pixel the Iter currently points to.
const int32_t cinder::SurfaceT< T >::ConstIter::y | ( | ) | const |
Returns the t coordinate of the pixel the Iter currently points to.
ivec2 cinder::SurfaceT< T >::ConstIter::getPos | ( | ) | const |
Returns the coordinate of the pixel the Iter currently points to.
bool cinder::SurfaceT< 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.
bool cinder::SurfaceT< T >::ConstIter::line | ( | ) |
Increments which row the Iter points to, and returns false
when no rows remain in the Surface.
int32_t cinder::SurfaceT< T >::ConstIter::getWidth | ( | ) | const |
int32_t cinder::SurfaceT< T >::ConstIter::getHeight | ( | ) | const |