|
DUDS
|
Distributed Update of Data from Something
|
Stores the dimensions of an image. More...
#include <BppImage.hpp>
Public Member Functions | |
| ImageDimensions ()=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 | ImageDimensions (Int0 dw, Int1 dh) |
| Construct with the given dimensions. More... | |
| void | clear () |
| Set the dimensions to zero area. More... | |
| constexpr ImageDimensions | clip (const ImageDimensions &dim, const ImageLocation &loc=ImageLocation(0, 0)) const |
| Returns a region clipped to fit within this object's dimensions. More... | |
| constexpr bool | empty () const |
| True if the dimensions indicate zero area. More... | |
| constexpr bool | fits (const ImageDimensions &id) const |
| Returns true if the given dimensions are not larger than this object's dimensions. More... | |
| constexpr bool | fits (const ImageLocation &loc, const ImageDimensions &id) const |
| Returns true if the given dimensions at the given location relative to this object can fit within this object's dimentions. More... | |
| constexpr ImageDimensions | maxExtent (const ImageDimensions &dim) const |
| Returns new dimensions that are minimally large enough to fit this dimension and the given dimension. More... | |
| constexpr ImageDimensions | minExtent (const ImageDimensions &dim) const |
| Returns new dimensions that only cover the union of this dimension and the given dimension. More... | |
| constexpr bool | operator!= (const ImageDimensions &id) const |
| Obvious inequality operator. More... | |
| constexpr bool | operator== (const ImageDimensions &id) const |
| Obvious equality operator. More... | |
| void | swapAxes () |
| Swaps the dimensions's axes. More... | |
| constexpr ImageDimensions | swappedAxes () const |
| Returns new dimensions with swapped axes. More... | |
| constexpr bool | withinBounds (const ImageLocation &loc) const |
| Returns true if the given location is within the bounds specified by this object. More... | |
Public Attributes | |
| std::int16_t | h |
| Height. More... | |
| std::int16_t | w |
| Width. More... | |
Stores the dimensions of an image.
Definition at line 125 of file BppImage.hpp.
|
default |
Construct uninitialized.
|
inline |
Construct with the given dimensions.
The template avoids warnings when the integer type is not std::int16_t. If a value is the result of a computation, it will likely be an int unless explicitly made otherwise, which is annoying.
| dw | The width. |
| dh | The height. |
Definition at line 152 of file BppImage.hpp.
|
inline |
Set the dimensions to zero area.
Definition at line 175 of file BppImage.hpp.
|
inline |
Returns a region clipped to fit within this object's dimensions.
| dim | The region that may need to be clipped to fit. |
| loc | The offset location into this object's area. The offset may be negative. The default is no offset. |
Definition at line 234 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppImage::write().
|
inline |
True if the dimensions indicate zero area.
Definition at line 169 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppPositionIndicator::BppPositionIndicator(), duds::ui::graphics::BppPositionIndicator::dimensions(), duds::ui::menu::renderers::BppMenuRenderer::iconDimensions(), duds::ui::graphics::BppImage::operator==(), duds::ui::menu::renderers::BppMenuRenderer::recalculateDimensions(), duds::ui::menu::renderers::BppMenuRenderer::render(), and duds::ui::graphics::BppImage::resize().
|
inline |
Returns true if the given dimensions are not larger than this object's dimensions.
Definition at line 189 of file BppImage.hpp.
Referenced by duds::ui::graphics::PriorityGridLayout::layout().
|
inline |
Returns true if the given dimensions at the given location relative to this object can fit within this object's dimentions.
Definition at line 196 of file BppImage.hpp.
|
inline |
Returns new dimensions that are minimally large enough to fit this dimension and the given dimension.
Definition at line 222 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppFont::estimatedMaxCharacterSize(), and duds::ui::graphics::MaxExtent().
|
inline |
Returns new dimensions that only cover the union of this dimension and the given dimension.
Definition at line 215 of file BppImage.hpp.
Referenced by duds::ui::menu::renderers::BppMenuRenderer::render().
|
inline |
Obvious inequality operator.
Definition at line 163 of file BppImage.hpp.
|
inline |
Obvious equality operator.
Definition at line 157 of file BppImage.hpp.
|
inline |
Swaps the dimensions's axes.
Definition at line 202 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppPositionIndicator::render(), and duds::ui::graphics::BppImage::write().
|
inline |
Returns new dimensions with swapped axes.
Definition at line 208 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppImage::write().
|
inline |
Returns true if the given location is within the bounds specified by this object.
Definition at line 182 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppImage::bufferSpot(), duds::ui::graphics::BppImage::cpixel(), duds::ui::graphics::BppImage::ConstPixel::dimensions(), duds::ui::graphics::BppImage::drawBox(), duds::ui::graphics::BppImage::ConstPixel::location(), duds::ui::graphics::BppImage::ConstPixel::origdimloc(), duds::ui::graphics::BppImage::ConstPixel::origin(), duds::ui::graphics::BppImage::pixel(), and duds::ui::graphics::PriorityGridLayout::render().
| std::int16_t duds::ui::graphics::ImageDimensions::h |
Height.
Definition at line 133 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppImage::BppImage(), duds::ui::graphics::BppPositionIndicator::BppPositionIndicator(), duds::ui::graphics::BppImage::bufferLine(), duds::ui::graphics::BppImage::clear(), clip(), duds::ui::graphics::BppPositionIndicator::dimensions(), duds::ui::graphics::BppImage::ConstPixel::height(), duds::ui::graphics::BppImage::height(), duds::ui::graphics::BppPositionIndicator::horizontal(), duds::ui::graphics::PriorityGridLayout::layout(), duds::ui::graphics::BppFont::lineDimensions(), maxExtent(), minExtent(), duds::ui::graphics::BppPositionIndicator::minMarkerSize(), duds::ui::graphics::BppImage::ConstPixel::operator++(), duds::ui::graphics::BppImage::operator==(), duds::ui::menu::renderers::BppMenuRenderer::recalculateDimensions(), 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::resize(), duds::ui::graphics::BppImage::size(), duds::ui::graphics::BppImage::startPosition(), duds::ui::graphics::swap(), and duds::ui::graphics::BppPositionIndicator::vertical().
| std::int16_t duds::ui::graphics::ImageDimensions::w |
Width.
Definition at line 129 of file BppImage.hpp.
Referenced by duds::ui::graphics::BppImage::BppImage(), duds::ui::graphics::BppPositionIndicator::BppPositionIndicator(), duds::ui::graphics::BppImage::bufferBlocksPerLine(), duds::ui::graphics::BppImage::clear(), clip(), duds::ui::graphics::BppPositionIndicator::dimensions(), duds::ui::graphics::BppPositionIndicator::horizontal(), duds::ui::graphics::PriorityGridLayout::layout(), duds::ui::graphics::BppFont::lineDimensions(), maxExtent(), minExtent(), duds::ui::graphics::BppPositionIndicator::minMarkerSize(), duds::ui::graphics::BppImage::ConstPixel::operator++(), duds::ui::graphics::BppImage::operator==(), duds::ui::menu::renderers::BppMenuRenderer::recalculateDimensions(), 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::resize(), duds::ui::graphics::BppImage::size(), duds::ui::graphics::BppImage::startPosition(), duds::ui::graphics::swap(), duds::ui::graphics::BppPositionIndicator::vertical(), duds::ui::graphics::BppImage::ConstPixel::width(), and duds::ui::graphics::BppImage::width().