- class Iterator
- {
- public:
- /**
- go back to (0, 0)
- */
- void Reset(const PixelData& data);
-
- /**
- Initializes the iterator to point to the origin of the given
- pixel data
- */
- Iterator(PixelData& data);
-
- /**
- Initializes the iterator to point to the origin of the given
- Bitmap
- */
- Iterator(wxBitmap& bmp, PixelData& data);
-
- /**
- Default constructor
- */
- Iterator();
-
- /**
- Return true if this iterator is valid
- */
- bool IsOk() const;
-
- /**
- Advance the iterator to the next pixel, prefix version
- */
- Iterator& operator++();
-
- /**
- Postfix (hence less efficient -- don't use it unless you
- absolutely must) version
- */
- Iterator operator++(int);
-
- /**
- Move x pixels to the right and y down
- note that the rows don't wrap!
- */
- void Offset(const PixelData& data, int x, int y);
-
- /**
- Move x pixels to the right (again, no row wrapping)
- */
- void OffsetX(const PixelData&data, int x);
-
- /**
- Move y rows to the bottom
- */
- void OffsetY(const PixelData& data, int y);
-
- /**
- Go to the given position
- */
- void MoveTo(const PixelData& data, int x, int y);
-
- //@{
- /**
- Data access: gives access to invidividual colour components.
- */
- ChannelType& Red();
- ChannelType& Green();
- ChannelType& Blue();
- ChannelType& Alpha();
- //@}
- };
+ class Iterator
+ {
+ public:
+
+ /**
+ Reset the iterator to point to (0, 0).
+ */
+ void Reset(const PixelData& data);
+
+ /**
+ Initializes the iterator to point to the origin of the given pixel
+ data.
+ */
+ Iterator(PixelData& data);
+
+ /**
+ Initializes the iterator to point to the origin of the given Bitmap.
+ */
+ Iterator(wxBitmap& bmp, PixelData& data);
+
+ /**
+ Default constructor.
+ */
+ Iterator();
+
+ /**
+ Return @true if this iterator is valid.
+ */
+ bool IsOk() const;
+
+ /**
+ Advance the iterator to the next pixel, prefix version.
+ */
+ Iterator& operator++();
+
+ /**
+ Advance the iterator to the next pixel, postfix (hence less
+ efficient -- don't use it unless you absolutely must) version.
+ */
+ Iterator operator++(int);
+
+ /**
+ Move @a x pixels to the right and @a y down.
+
+ @note The rows won't wrap automatically.
+ */
+ void Offset(const PixelData& data, int x, int y);
+
+ /**
+ Move @a x pixels to the right.
+
+ @note The rows won't wrap automatically.
+ */
+ void OffsetX(const PixelData&data, int x);
+
+ /**
+ Move @a y rows to the bottom
+ */
+ void OffsetY(const PixelData& data, int y);
+
+ /**
+ Go to the given position
+ */
+ void MoveTo(const PixelData& data, int x, int y);
+
+ //@{
+ /**
+ Data Access: Access to invidividual colour components.
+ */
+ ChannelType& Red();
+ ChannelType& Green();
+ ChannelType& Blue();
+ ChannelType& Alpha();
+ //@}
+ };