|
DUDS
|
Distributed Update of Data from Something
|
A forward iterator like class that visits each location of the image or a subset of the image. More...
#include <BppImage.hpp>
Classes | |
| class | ConstBoolProxy |
| Retreives a pixel's state; used to allow ConstPixel to be dereferenced like any other iterator to get a bool for the pixel. More... | |
| struct | End |
Public Types | |
| typedef bool | value_type |
Public Member Functions | |
| constexpr | ConstPixel () |
| Construct a ConstPixel to nowhere. More... | |
| constexpr | ConstPixel (const EndPixel) |
| Construct a ConstPixel to nowhere. More... | |
| ConstPixel (const ConstPixel &)=default | |
| Obvious copy constructor. More... | |
| ConstPixel (const BppImage *img, const End e) | |
| Construct a ConstPixel to be the end iterator of the given image. More... | |
| ConstPixel (const BppImage *img, const ImageLocation &il=ImageLocation(0, 0), Direction d=HorizInc) | |
| Construct a ConstPixel to reference the requested location of the image. More... | |
| ConstPixel (const BppImage *img, int x, int y, Direction d=HorizInc) | |
| Construct a ConstPixel to reference the requested location of the image. More... | |
| ConstPixel (const BppImage *img, const ImageLocation &o, const ImageDimensions &s, const ImageLocation &p=ImageLocation(0, 0), Direction d=HorizInc) | |
| Construct a ConstPixel to iterate over a subset of the image, and start at a given spot. More... | |
| ImageLocation | absLocation () const |
| Returns the absolute coordinates of the referenced pixel. More... | |
| int | absX () const |
| Returns the absolute horizontal coordinate of the referenced pixel. More... | |
| int | absY () const |
| Returns the absolute vertical coordinate of the referenced pixel. More... | |
| const ImageDimensions & | dimensions () const |
| Returns this object's dimensions used to limit the area of the source image that will be visited. More... | |
| void | dimensions (const ImageDimensions &d) |
| Changes the dimensions of this object. More... | |
| Direction | direction () const |
| Returns the direction used for incrementing. More... | |
| void | direction (Direction d) |
| Changes the direction used for incrementing. More... | |
| int | height () const |
| Returns the height of this object's dimensions used to limit the area of the source image that will be visited. More... | |
| const ImageLocation & | location () const |
| Returns the coordinates of the referenced pixel relative to this object's origin. More... | |
| void | location (const ImageLocation &il) |
| Changes the location referenced by this ConstPixel relative to its origin. More... | |
| void | location (int x, int y) |
| Changes the location referenced by this ConstPixel relative to its origin. More... | |
| bool | operator!= (const ConstPixel &cp) const |
| Obvious inequality operator. More... | |
| bool | operator!= (const EndPixel) const |
| False if this object is an end iterator or an iterator to nowhere. More... | |
| ConstBoolProxy | operator* () const |
| Dereferences the ConstPixel; provides the state of the pixel. More... | |
| ConstPixel & | operator++ () |
| Pre-increment operator. More... | |
| ConstPixel | operator++ (int) |
| Post-increment operator. More... | |
| ConstPixel & | operator= (const ConstPixel &)=default |
| Obvious assignment operator. More... | |
| ConstPixel & | operator= (const Pixel &p) |
| Assigns a ConstPixel to reference the same location of the same image as the given Pixel object. More... | |
| ConstPixel & | operator= (const EndPixel) |
| Assigns a ConstPixel to nowhere. More... | |
| bool | operator== (const ConstPixel &cp) const |
| Less than obvious equality operator. More... | |
| bool | operator== (const EndPixel) const |
| True if this object is an end iterator or an iterator to nowhere. More... | |
| void | origdimloc (const ImageLocation &o, const ImageDimensions &d, const ImageLocation &p) |
| Changes the origin, dimensions, and relative position of this object. More... | |
| const ImageLocation & | origin () const |
| Returns this object's origin used to limit the area of the source image that will be visited. More... | |
| void | origin (const ImageLocation &il) |
| Changes the origin of this object. More... | |
| int | originX () const |
| Returns the X coordinate of this object's origin used to limit the area of the source image that will be visited. More... | |
| int | originY () const |
| Returns the Y coordinate of this object's origin used to limit the area of the source image that will be visited. More... | |
| bool | state () const |
| Returns the state of the referenced pixel. More... | |
| int | width () const |
| Returns the width of this object's dimensions used to limit the area of the source image that will be visited. More... | |
| int | x () const |
| Returns the horizontal coordinate of the referenced pixel relative to this object's origin. More... | |
| int | y () const |
| Returns the vertical coordinate of the referenced pixel relative to this object's origin. More... | |
Protected Attributes | |
| PixelBlock * | blk |
| The PixelBlock containing the referenced pixel. More... | |
| ImageDimensions | dim |
| The dimensions of the image to iterate over; can be used to limit the portion visited by the iterator. More... | |
| Direction | dir |
| The direction to move when incremented. More... | |
| PixelBlock | mask |
| The mask used to isolate the referenced pixel. More... | |
| ImageLocation | orig |
| Upper left corner of the image to limit the iteration to a portion of the whole image. More... | |
| ImageLocation | pos |
| The location of the referenced pixel on the source image. More... | |
| BppImage * | src |
| The image to operate upon. More... | |
A forward iterator like class that visits each location of the image or a subset of the image.
The iterator becomes invalid whenever one of these actions occur on the source image:
Definition at line 456 of file BppImage.hpp.
| typedef bool duds::ui::graphics::BppImage::ConstPixel::value_type |
Definition at line 815 of file BppImage.hpp.
|
inline |
Construct a ConstPixel to nowhere.
Definition at line 498 of file BppImage.hpp.
Referenced by operator=().
|
inline |
Construct a ConstPixel to nowhere.
Definition at line 510 of file BppImage.hpp.
|
default |
Obvious copy constructor.
Construct a ConstPixel to be the end iterator of the given image.
Definition at line 556 of file BppImage.cpp.
| duds::ui::graphics::BppImage::ConstPixel::ConstPixel | ( | const BppImage * | img, |
| const ImageLocation & | il = ImageLocation(0, 0), |
||
| Direction | d = HorizInc |
||
| ) |
Construct a ConstPixel to reference the requested location of the image.
| ImageBoundsError |
Definition at line 565 of file BppImage.cpp.
|
inline |
Construct a ConstPixel to reference the requested location of the image.
| ImageBoundsError |
Definition at line 534 of file BppImage.hpp.
| duds::ui::graphics::BppImage::ConstPixel::ConstPixel | ( | const BppImage * | img, |
| const ImageLocation & | o, | ||
| const ImageDimensions & | s, | ||
| const ImageLocation & | p = ImageLocation(0, 0), |
||
| Direction | d = HorizInc |
||
| ) |
Construct a ConstPixel to iterate over a subset of the image, and start at a given spot.
| img | The source image to iterate over. |
| o | The origin (top left); used to limit the iteration to a subset of the image data. The top left location is not modified by the iteration direction d. The area to iterate over must exist within the source image. |
| s | The size of the image to iterate over. This is used to limit the iteration to a subset of the image data. The axes for width and height are not modified by the iteration direction d. The area to iterate over must exist within the source image. |
| p | The starting position of the iteration. Its axes are not modified by the iteration direction d. It must specify a position within the dimensions s. It will not change when iteration will end. |
| d | The direction of the iteration as defined in the enum Direction. |
| ImageBoundsError | Either the starting position p is beyond the dimensions s, or the area to iterate over goes beyond the bounds of the source image img. |
Definition at line 581 of file BppImage.cpp.
|
inline |
Returns the absolute coordinates of the referenced pixel.
Definition at line 700 of file BppImage.hpp.
|
inline |
Returns the absolute horizontal coordinate of the referenced pixel.
Definition at line 688 of file BppImage.hpp.
|
inline |
Returns the absolute vertical coordinate of the referenced pixel.
Definition at line 694 of file BppImage.hpp.
|
inline |
Returns this object's dimensions used to limit the area of the source image that will be visited.
Definition at line 749 of file BppImage.hpp.
| void duds::ui::graphics::BppImage::ConstPixel::dimensions | ( | const ImageDimensions & | d | ) |
Changes the dimensions of this object.
The relative position and the origin are not changed. This means the absolute position will also not change. The dimensions must fit within the source image.
Definition at line 715 of file BppImage.cpp.
|
inline |
Returns the direction used for incrementing.
Definition at line 591 of file BppImage.hpp.
|
inline |
Changes the direction used for incrementing.
Definition at line 597 of file BppImage.hpp.
|
inline |
Returns the height of this object's dimensions used to limit the area of the source image that will be visited.
Definition at line 742 of file BppImage.hpp.
|
inline |
Returns the coordinates of the referenced pixel relative to this object's origin.
Definition at line 668 of file BppImage.hpp.
Referenced by ConstPixel().
| void duds::ui::graphics::BppImage::ConstPixel::location | ( | const ImageLocation & | il | ) |
Changes the location referenced by this ConstPixel relative to its origin.
| ImageBoundsError |
Definition at line 687 of file BppImage.cpp.
|
inline |
Changes the location referenced by this ConstPixel relative to its origin.
| ImageBoundsError |
Definition at line 682 of file BppImage.hpp.
|
inline |
Obvious inequality operator.
Definition at line 627 of file BppImage.hpp.
|
inline |
False if this object is an end iterator or an iterator to nowhere.
Definition at line 633 of file BppImage.hpp.
|
inline |
Dereferences the ConstPixel; provides the state of the pixel.
Definition at line 809 of file BppImage.hpp.
| BppImage::ConstPixel & duds::ui::graphics::BppImage::ConstPixel::operator++ | ( | ) |
Pre-increment operator.
Definition at line 607 of file BppImage.cpp.
|
inline |
Post-increment operator.
This involves the copying the ConstPixel.
Definition at line 643 of file BppImage.hpp.
|
default |
Obvious assignment operator.
| BppImage::ConstPixel & duds::ui::graphics::BppImage::ConstPixel::operator= | ( | const Pixel & | p | ) |
Assigns a ConstPixel to reference the same location of the same image as the given Pixel object.
Definition at line 601 of file BppImage.cpp.
|
inline |
Assigns a ConstPixel to nowhere.
Definition at line 583 of file BppImage.hpp.
| bool duds::ui::graphics::BppImage::ConstPixel::operator== | ( | const ConstPixel & | cp | ) | const |
Less than obvious equality operator.
If either operand has a source image of nullptr, then they are equal only if both have a position of (-1,-1), Otherwise, all fields must exactly match.
Definition at line 759 of file BppImage.cpp.
|
inline |
True if this object is an end iterator or an iterator to nowhere.
Definition at line 621 of file BppImage.hpp.
| void duds::ui::graphics::BppImage::ConstPixel::origdimloc | ( | const ImageLocation & | o, |
| const ImageDimensions & | d, | ||
| const ImageLocation & | p | ||
| ) |
Changes the origin, dimensions, and relative position of this object.
This will also change the absolute position. The new image subset must fit within the bounds of the source image.
| o | The origin (top left); used to limit the iteration to a subset of the image data. The top left location is not modified by the iteration direction. The area to iterate over must exist within the source image. |
| d | The size of the image to iterate over. This is used to limit the iteration to a subset of the image data. The axes for width and height are not modified by the iteration direction. The area to iterate over must exist within the source image. |
| p | The current relative position. Its axes are not modified by the iteration direction. It must specify a position within the dimensions d. |
Definition at line 730 of file BppImage.cpp.
Referenced by ConstPixel().
|
inline |
Returns this object's origin used to limit the area of the source image that will be visited.
Definition at line 721 of file BppImage.hpp.
| void duds::ui::graphics::BppImage::ConstPixel::origin | ( | const ImageLocation & | il | ) |
Changes the origin of this object.
The relative position and the dimensions are not changed. This means the absolute position will change, and that the dimensions must still fit within the source image.
Definition at line 701 of file BppImage.cpp.
|
inline |
Returns the X coordinate of this object's origin used to limit the area of the source image that will be visited.
Definition at line 707 of file BppImage.hpp.
|
inline |
Returns the Y coordinate of this object's origin used to limit the area of the source image that will be visited.
Definition at line 714 of file BppImage.hpp.
| bool duds::ui::graphics::BppImage::ConstPixel::state | ( | ) | const |
Returns the state of the referenced pixel.
| ImageIteratorEndError |
Definition at line 773 of file BppImage.cpp.
Referenced by duds::ui::graphics::BppImage::ConstPixel::ConstBoolProxy::operator bool().
|
inline |
Returns the width of this object's dimensions used to limit the area of the source image that will be visited.
Definition at line 735 of file BppImage.hpp.
|
inline |
Returns the horizontal coordinate of the referenced pixel relative to this object's origin.
Definition at line 654 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppImage::Pixel::operator=().
|
inline |
Returns the vertical coordinate of the referenced pixel relative to this object's origin.
Definition at line 661 of file BppImage.hpp.
|
protected |
The PixelBlock containing the referenced pixel.
Definition at line 471 of file BppImage.hpp.
Referenced by ConstPixel(), location(), operator++(), origdimloc(), origin(), state(), duds::ui::graphics::BppImage::Pixel::state(), and duds::ui::graphics::BppImage::Pixel::toggle().
|
protected |
The dimensions of the image to iterate over; can be used to limit the portion visited by the iterator.
Definition at line 489 of file BppImage.hpp.
Referenced by dimensions(), location(), duds::ui::graphics::MaxExtent(), operator++(), operator==(), origdimloc(), and origin().
|
protected |
The direction to move when incremented.
Definition at line 493 of file BppImage.hpp.
Referenced by operator++().
|
protected |
The mask used to isolate the referenced pixel.
Definition at line 475 of file BppImage.hpp.
Referenced by ConstPixel(), location(), operator++(), origdimloc(), origin(), state(), duds::ui::graphics::BppImage::Pixel::state(), and duds::ui::graphics::BppImage::Pixel::toggle().
|
protected |
Upper left corner of the image to limit the iteration to a portion of the whole image.
Definition at line 484 of file BppImage.hpp.
Referenced by location(), operator++(), operator==(), origdimloc(), and origin().
|
protected |
The location of the referenced pixel on the source image.
Definition at line 479 of file BppImage.hpp.
Referenced by ConstPixel(), dimensions(), location(), operator!=(), operator++(), operator==(), origdimloc(), and origin().
|
protected |
The image to operate upon.
This is a non-const pointer because this class serves as the base class for Pixel. No functions in this class will ever modify src.
Definition at line 465 of file BppImage.hpp.
Referenced by ConstPixel(), dimensions(), location(), operator!=(), operator++(), operator==(), origdimloc(), and origin().