|
DUDS
|
Distributed Update of Data from Something
|
Stores a location within an image. More...
#include <BppImage.hpp>
Public Member Functions | |
| ImageLocation ()=default | |
| Construct uninitialized. More... | |
| template<typename Int0 , typename Int1 , std::enable_if_t< std::is_integral< Int0 >::value, bool > = true, std::enable_if_t< std::is_integral< Int1 >::value, bool > = true> | |
| constexpr | ImageLocation (Int0 px, Int1 py) |
| Construct with the given location. More... | |
| constexpr bool | operator!= (const ImageLocation &il) const |
| Obvious inequality operator. More... | |
| constexpr ImageLocation | operator+ (const ImageLocation &il) const |
| Add locations together. More... | |
| constexpr ImageLocation | operator+ (const ImageDimensions &id) const |
| Add in dimensions. More... | |
| constexpr ImageLocation | operator- (const ImageLocation &il) const |
| Subtract locations. More... | |
| constexpr ImageLocation | operator- (const ImageDimensions &id) const |
| Subtract dimensions. More... | |
| constexpr bool | operator== (const ImageLocation &il) const |
| Obvious equality operator. More... | |
| void | swapAxes () |
| Swaps the location's axes. More... | |
| constexpr ImageLocation | swappedAxes () const |
| Returns a new location with swapped axes. More... | |
Public Attributes | |
| std::int16_t | x |
| Horizontal coordinate. More... | |
| std::int16_t | y |
| Vertical coordinate. More... | |
Stores a location within an image.
Definition at line 33 of file BppImage.hpp.
|
default |
Construct uninitialized.
Referenced by duds::ui::graphics::BppImage::bufferSpot(), duds::ui::graphics::BppImage::ConstPixel::ConstPixel(), duds::ui::graphics::BppImage::cpixel(), duds::ui::graphics::BppImage::drawBox(), duds::ui::graphics::BppImage::invertPixel(), duds::ui::graphics::BppImage::ConstPixel::location(), operator+(), operator-(), duds::ui::graphics::BppImage::pixel(), duds::ui::graphics::BppImage::state(), swappedAxes(), and duds::ui::graphics::BppImage::write().
|
inline |
Construct with the given location.
The template avoids warnings when the integer type is not std::int16_t. If the coordinate value is the result of a computation, it will likely be an int unless explicitly made otherwise, which is annoying.
| px | The X coord. |
| py | The Y coord. |
Definition at line 60 of file BppImage.hpp.
|
inline |
Obvious inequality operator.
Definition at line 71 of file BppImage.hpp.
|
inline |
| constexpr ImageLocation duds::ui::graphics::ImageLocation::operator+ | ( | const ImageDimensions & | id | ) | const |
Add in dimensions.
Adds the width and height of an ImageDimensions to the x and y coordinates of a ImageLocation.
Definition at line 268 of file BppImage.hpp.
|
inline |
Subtract locations.
Definition at line 83 of file BppImage.hpp.
| constexpr ImageLocation duds::ui::graphics::ImageLocation::operator- | ( | const ImageDimensions & | id | ) | const |
Subtract dimensions.
Subtracts the width and height of an ImageDimensions from the x and y coordinates of a ImageLocation.
Definition at line 278 of file BppImage.hpp.
|
inline |
Obvious equality operator.
Definition at line 65 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppImage::data(), and duds::ui::graphics::BppImage::ConstPixel::direction().
|
inline |
Swaps the location's axes.
Definition at line 97 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppPositionIndicator::render().
|
inline |
Returns a new location with swapped axes.
Definition at line 103 of file BppImage.hpp.
| std::int16_t duds::ui::graphics::ImageLocation::x |
Horizontal coordinate.
Definition at line 37 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppImage::ConstPixel::absX(), duds::ui::graphics::BppImage::bufferSpot(), duds::ui::graphics::BppImage::ConstPixel::ConstPixel(), duds::ui::graphics::BppImage::drawBox(), duds::ui::graphics::ImageDimensions::fits(), operator!=(), duds::ui::graphics::BppImage::ConstPixel::operator!=(), operator+(), duds::ui::graphics::BppImage::ConstPixel::operator++(), operator-(), duds::ui::graphics::operator<<(), duds::ui::graphics::BppImage::ConstPixel::operator=(), operator==(), duds::ui::graphics::BppImage::ConstPixel::operator==(), duds::ui::graphics::BppImage::ConstPixel::originX(), duds::ui::graphics::BppFont::render(), duds::ui::graphics::BppPositionIndicator::render(), duds::ui::graphics::PriorityGridLayout::render(), duds::ui::menu::renderers::BppMenuRenderer::render(), duds::ui::graphics::BppImage::startPosition(), duds::ui::graphics::swap(), duds::ui::graphics::ImageDimensions::withinBounds(), and duds::ui::graphics::BppImage::ConstPixel::x().
| std::int16_t duds::ui::graphics::ImageLocation::y |
Vertical coordinate.
Definition at line 41 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppImage::ConstPixel::absY(), duds::ui::graphics::BppImage::bufferSpot(), duds::ui::graphics::BppImage::ConstPixel::ConstPixel(), duds::ui::graphics::BppImage::drawBox(), duds::ui::graphics::ImageDimensions::fits(), operator!=(), duds::ui::graphics::BppImage::ConstPixel::operator!=(), operator+(), duds::ui::graphics::BppImage::ConstPixel::operator++(), operator-(), duds::ui::graphics::operator<<(), duds::ui::graphics::BppImage::ConstPixel::operator=(), operator==(), duds::ui::graphics::BppImage::ConstPixel::operator==(), duds::ui::graphics::BppImage::ConstPixel::originY(), duds::ui::graphics::BppFont::render(), duds::ui::graphics::BppPositionIndicator::render(), duds::ui::graphics::PriorityGridLayout::render(), duds::ui::menu::renderers::BppMenuRenderer::render(), duds::ui::graphics::BppImage::startPosition(), duds::ui::graphics::swap(), duds::ui::graphics::ImageDimensions::withinBounds(), and duds::ui::graphics::BppImage::ConstPixel::y().