ContRap-Libraries
Public Member Functions | Protected Attributes

crp::Image< T >::RectIterator Class Reference

Class RectIterator iterates over a rectangle. More...

#include <image.h>

Inheritance diagram for crp::Image< T >::RectIterator:
crp::Image< T >::PrimitiveIterator

Public Member Functions

 RectIterator (Image< T > &image, Rect2D &rect)
 Creates a new rectangular iterator.
virtual ~RectIterator ()
 Virtual destructor.
virtual RectIteratoroperator++ (int)
 Takes the next pixel.
virtual RectIteratoroperator-- (int)
 Takes the previous pixel.
virtual bool at_end ()
 Returns true if the operator is at the end.
virtual bool at_begin ()
 Returns true if the operator is at the beginning.

Protected Attributes

Rect2D rect
 Primitive.

Detailed Description

template<class T>
class crp::Image< T >::RectIterator

Class RectIterator iterates over a rectangle.


Constructor & Destructor Documentation

template<class T >
crp::Image< T >::RectIterator::RectIterator ( Image< T > &  image,
Rect2D rect 
) [inline]

Creates a new rectangular iterator.

Parameters:
imageAssociated image
rectRectangular
template<class T >
virtual crp::Image< T >::RectIterator::~RectIterator ( ) [inline, virtual]

Virtual destructor.


Member Function Documentation

template<class T >
virtual bool crp::Image< T >::RectIterator::at_begin ( ) [inline, virtual]

Returns true if the operator is at the beginning.

Returns:
True if the operator will not move backwards

Implements crp::Image< T >::PrimitiveIterator.

template<class T >
virtual bool crp::Image< T >::RectIterator::at_end ( ) [inline, virtual]

Returns true if the operator is at the end.

Returns:
True if the operator will not move any further

Implements crp::Image< T >::PrimitiveIterator.

template<class T >
virtual RectIterator& crp::Image< T >::RectIterator::operator++ ( int  ) [inline, virtual]

Takes the next pixel.

Returns:
Reference to itself

Implements crp::Image< T >::PrimitiveIterator.

template<class T >
virtual RectIterator& crp::Image< T >::RectIterator::operator-- ( int  ) [inline, virtual]

Takes the previous pixel.

Returns:
Reference to itself

Implements crp::Image< T >::PrimitiveIterator.


Field Documentation

template<class T >
Rect2D crp::Image< T >::RectIterator::rect [protected]

Primitive.


The documentation for this class was generated from the following file: