|
ContRap-Libraries
|
PrimitiveIterator iterates over the pixels of a primitive. More...
#include <image.h>
Public Member Functions | |
| PrimitiveIterator (Image< T > &image, int x, int y) | |
| Default constructor. | |
| virtual | ~PrimitiveIterator () |
| Virtual destructor. | |
| virtual PrimitiveIterator & | operator++ (int)=0 |
| Takes the next pixel. | |
| virtual PrimitiveIterator & | operator-- (int)=0 |
| Takes the previous pixel. | |
| T & | operator* () |
| Returns the reference to the data. | |
| virtual bool | at_end ()=0 |
| Returns true if the operator is at the end. | |
| virtual bool | at_begin ()=0 |
| Returns true if the operator is at the beginning. | |
| int | get_x () |
| Returns the coordinate of the iterator. | |
| int | get_y () |
| Returns the coordinate of the iterator. | |
Protected Attributes | |
| int | x |
| Current position. | |
| int | y |
| Image< T > & | image |
| Current image. | |
PrimitiveIterator iterates over the pixels of a primitive.
| crp::Image< T >::PrimitiveIterator::PrimitiveIterator | ( | Image< T > & | image, |
| int | x, | ||
| int | y | ||
| ) | [inline] |
Default constructor.
| image | Associated image |
| x | Start coordinate |
| y | Start coordinate |
| virtual crp::Image< T >::PrimitiveIterator::~PrimitiveIterator | ( | ) | [inline, virtual] |
Virtual destructor.
| virtual bool crp::Image< T >::PrimitiveIterator::at_begin | ( | ) | [pure virtual] |
Returns true if the operator is at the beginning.
Implemented in crp::Image< T >::RectIterator, and crp::Image< T >::LineIterator.
| virtual bool crp::Image< T >::PrimitiveIterator::at_end | ( | ) | [pure virtual] |
Returns true if the operator is at the end.
Implemented in crp::Image< T >::RectIterator, and crp::Image< T >::LineIterator.
| int crp::Image< T >::PrimitiveIterator::get_x | ( | ) | [inline] |
Returns the coordinate of the iterator.
| int crp::Image< T >::PrimitiveIterator::get_y | ( | ) | [inline] |
Returns the coordinate of the iterator.
| T& crp::Image< T >::PrimitiveIterator::operator* | ( | ) | [inline] |
Returns the reference to the data.
| virtual PrimitiveIterator& crp::Image< T >::PrimitiveIterator::operator++ | ( | int | ) | [pure virtual] |
Takes the next pixel.
Implemented in crp::Image< T >::RectIterator, and crp::Image< T >::LineIterator.
| virtual PrimitiveIterator& crp::Image< T >::PrimitiveIterator::operator-- | ( | int | ) | [pure virtual] |
Takes the previous pixel.
Implemented in crp::Image< T >::RectIterator, and crp::Image< T >::LineIterator.
Image<T>& crp::Image< T >::PrimitiveIterator::image [protected] |
Current image.
int crp::Image< T >::PrimitiveIterator::x [protected] |
Current position.
int crp::Image< T >::PrimitiveIterator::y [protected] |
1.7.3