HikoGUI
Select Version: ⚠️ This documents the main development branch of HikoGUI. It might differ from release versions.
A low latency retained GUI
|
#include <hikogui/image/pixmap.hpp>
Data Structures | |
struct | row_iterator |
struct | row_range |
Public Types | |
using | value_type = T |
The pixel format type. | |
using | allocator_type = Allocator |
The allocator to use for allocating the array. | |
using | size_type = size_t |
The size type. | |
using | pointer = value_type * |
using | const_pointer = value_type const * |
using | reference = value_type& |
using | const_reference = value_type const& |
using | interator = pointer |
using | const_iterator = const_pointer |
using | row_type = std::span<value_type> |
The type for a row of pixels. | |
using | const_row_type = std::span<value_type const> |
The type for a row of pixels. | |
Public Member Functions | |
constexpr | pixmap (pixmap const &other) |
Copy constructor. | |
constexpr | pixmap (pixmap &&other) noexcept |
Move constructor. | |
constexpr pixmap & | operator= (pixmap const &other) |
Copy assignment. | |
constexpr pixmap & | operator= (pixmap &&other) |
Move assignment. | |
constexpr | pixmap (size_type width, size_type height, allocator_type allocator=allocator_type{}) |
Create an pixmap of width and height. | |
template<std::convertible_to< value_type > O> | |
constexpr | pixmap (O *hi_restrict data, size_type width, size_type height, size_type stride, allocator_type allocator=allocator_type{}) |
template<std::convertible_to< value_type > O> | |
constexpr | pixmap (O *hi_restrict data, size_type width, size_type height, allocator_type allocator=allocator_type{}) noexcept |
template<std::convertible_to< value_type > O> | |
constexpr | pixmap (pixmap< O > const &other, allocator_type allocator=allocator_type{}) |
template<std::convertible_to< value_type > O> | |
constexpr | pixmap (pixmap_span< O > const &other, allocator_type allocator=allocator_type{}) |
template<std::same_as< value_type const > O> | |
constexpr | operator pixmap_span< O > () const noexcept |
constexpr allocator_type | get_allocator () const noexcept |
constexpr size_type | width () const noexcept |
constexpr size_type | height () const noexcept |
constexpr size_type | size () const noexcept |
The number of pixels (width * height) in this image. | |
constexpr size_type | capacity () const noexcept |
The number of pixels of capacity allocated. | |
constexpr bool | empty () const noexcept |
constexpr pointer | data () noexcept |
constexpr const_pointer | data () const noexcept |
constexpr interator | begin () noexcept |
constexpr const_iterator | begin () const noexcept |
constexpr const_iterator | cbegin () const noexcept |
constexpr interator | end () noexcept |
constexpr const_iterator | end () const noexcept |
constexpr const_iterator | cend () const noexcept |
constexpr reference | operator() (size_type x, size_type y) noexcept |
constexpr const_reference | operator() (size_type x, size_type y) const noexcept |
constexpr row_type | operator[] (size_type y) noexcept |
constexpr const_row_type | operator[] (size_type y) const noexcept |
constexpr auto | rows () noexcept |
constexpr auto | rows () const noexcept |
constexpr pixmap | subimage (size_type x, size_type y, size_type new_width, size_type new_height, allocator_type allocator) const noexcept |
constexpr pixmap | subimage (size_type x, size_type y, size_type new_width, size_type new_height) const noexcept |
constexpr void | clear () noexcept |
constexpr void | shrink_to_fit () |
Friends | |
constexpr friend bool | operator== (pixmap const &lhs, pixmap const &rhs) noexcept |
constexpr friend void | fill (pixmap &dst, value_type value=value_type{}) noexcept |
A 2D pixel-based image.
T | The pixel format. |
Allocator | The allocator to use for allocating the array of pixels. |
using hi::v1::pixmap< T, Allocator >::allocator_type = Allocator |
The allocator to use for allocating the array.
using hi::v1::pixmap< T, Allocator >::const_row_type = std::span<value_type const> |
The type for a row of pixels.
using hi::v1::pixmap< T, Allocator >::row_type = std::span<value_type> |
The type for a row of pixels.
using hi::v1::pixmap< T, Allocator >::size_type = size_t |
The size type.
using hi::v1::pixmap< T, Allocator >::value_type = T |
The pixel format type.
|
inlineconstexpr |
Copy constructor.
Copy the image from other; using the allocator obtained using std::allocator_traits<Allocator>::select_on_container_copy_construction(other.get_allocator())
The new allocation will be fit the pixels in the image exactly.
other | The other image to copy. |
|
inlineconstexprnoexcept |
Move constructor.
Move the image.
other | The other image to copy. |
|
inlineconstexpr |
Create an pixmap of width and height.
|
inlineconstexprnoexcept |
The number of pixels of capacity allocated.
|
inlineconstexpr |
Move assignment.
Move the image. Allocation uses the std::allocator_trait<Allocator>::propagate_on_container_move_assignment
other | The other image to copy. |
|
inlineconstexpr |
Copy assignment.
Copy the image. Allocation uses the std::allocator_trait<Allocator>::propagate_on_container_copy_assignment
other | The other image to copy. |
|
inlineconstexprnoexcept |
The number of pixels (width * height) in this image.