Convenience class for iterating the pixels of a Surface.
Public Member Functions
-
Iter (SurfaceT< T > &SurfaceT, const Area &area)
-
T &r () const
Returns a reference to the red value of the pixel that the Iter currently points to
-
T &g () const
Returns a reference to the green value of the pixel that the Iter currently points to
-
T &b () const
Returns a reference to the blue value of the pixel that the Iter currently points to
-
T &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.
-
T &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.
-
T &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.
-
T &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.
-
T &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. Undefined in the absence of an alpha channel.
-
T &
-
T &
-
T &
-
T &
-
const int32_tx () const
Returns the x coordinate of the pixel the Iter currently points to.
-
const int32_ty () const
Returns the y coordinate of the pixel the Iter currently points to.
-
ivec2getPos () const
Returns the coordinate of the pixel the Iter currently points to.
-
boolpixel ()
Increments which pixel of the current row the Iter points to, and returns
false
when no pixels remain in the current row. -
boolline ()
Increments which row the Iter points to, and returns
false
when no rows remain in the Surface. -
int32_t
-
int32_t