Access to RGB colour pixel values of a Frame. More...
#include <Frame.hpp>
Classes | |
| struct | RGBPixel |
| Colour value for an RGB pixel. More... | |
Public Member Functions | |
| RGBPlane (const Frame &f) | |
| Constructor from a given Frame. | |
| int | width () const |
| Width of the referred Frame. | |
| int | height () const |
| Height of the referred Frame. | |
| RGBPixel | getPixel (int x, int y) const |
| Get the colour value at given coordinates. | |
| void | setPixel (int x, int y, const RGBPixel &p) |
| Set the colour value at given coordinates. | |
Access to RGB colour pixel values of a Frame.
This class offers read and write access to RGB pixels of a Frame, of the data type mandated by the template.
Objects of this class do not include a reference to the referred Frame, so the user should keep the Frame in memory while using related RGBPlane objects.
Traversing all the pixels in a plane can be done with efficient creating a RGBPlane object from a Frame, iterating over rows creating Row objects, and then iterating inside each Row.
| sal3d::Frame::RGBPlane< T >::RGBPlane | ( | const Frame & | f | ) | [inline] |
| RGBPixel sal3d::Frame::RGBPlane< T >::getPixel | ( | int | x, |
| int | y | ||
| ) | const [inline] |
Get the colour value at given coordinates.
| x | The X coordinate of the pixel |
| y | The Y coordinate of the pixel |
| void sal3d::Frame::RGBPlane< T >::setPixel | ( | int | x, |
| int | y, | ||
| const RGBPixel & | p | ||
| ) | [inline] |
Set the colour value at given coordinates.
| x | The X coordinate of the pixel |
| y | The Y coordinate of the pixel |
| p | The RGB colour to assign to the coordinates |
by
1.7.6.1