@@ -384,6 +384,7 @@ Class for iterating pixels on a raster line. ::
...
@@ -384,6 +384,7 @@ Class for iterating pixels on a raster line. ::
// move the iterator to the next pixel
// move the iterator to the next pixel
LineIterator& operator ++();
LineIterator& operator ++();
LineIterator operator ++(int);
LineIterator operator ++(int);
Point pos() const;
// internal state of the iterator
// internal state of the iterator
uchar* ptr;
uchar* ptr;
...
@@ -394,16 +395,23 @@ Class for iterating pixels on a raster line. ::
...
@@ -394,16 +395,23 @@ Class for iterating pixels on a raster line. ::
The class ``LineIterator`` is used to get each pixel of a raster line. It can be treated as versatile implementation of the Bresenham algorithm where you can stop at each pixel and do some extra processing, for example, grab pixel values along the line or draw a line with an effect (for example, with XOR operation).
The class ``LineIterator`` is used to get each pixel of a raster line. It can be treated as versatile implementation of the Bresenham algorithm where you can stop at each pixel and do some extra processing, for example, grab pixel values along the line or draw a line with an effect (for example, with XOR operation).
The number of pixels along the line is stored in ``LineIterator::count`` . ::
The number of pixels along the line is stored in ``LineIterator::count`` . The method ``LineIterator::pos`` returns the current position in the image ::