HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
hikogui
image
uint_abgr8_pack.hpp
Go to the documentation of this file.
1
// Copyright Take Vos 2021.
2
// Distributed under the Boost Software License, Version 1.0.
3
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
9
#pragma once
10
11
#include "../geometry/module.hpp"
12
#include <algorithm>
13
14
namespace
hi::inline
v1
{
15
20
class
uint_abgr8_pack
{
21
uint32_t v = {};
22
23
public
:
24
constexpr
uint_abgr8_pack
() =
default
;
25
constexpr
uint_abgr8_pack
(
uint_abgr8_pack
const
&rhs)
noexcept
=
default
;
26
constexpr
uint_abgr8_pack
(
uint_abgr8_pack
&&rhs)
noexcept
=
default
;
27
constexpr
uint_abgr8_pack
&operator=(
uint_abgr8_pack
const
&rhs)
noexcept
=
default
;
28
constexpr
uint_abgr8_pack
&operator=(
uint_abgr8_pack
&&rhs)
noexcept
=
default
;
29
30
constexpr
explicit
uint_abgr8_pack
(uint32_t
const
&rhs) noexcept : v(rhs) {}
31
constexpr
uint_abgr8_pack
&operator=(uint32_t
const
&rhs)
noexcept
32
{
33
v = rhs;
34
return
*
this
;
35
}
36
constexpr
explicit
operator
uint32_t()
noexcept
37
{
38
return
v;
39
}
40
41
constexpr
explicit
uint_abgr8_pack
(f32x4
const
&rhs) noexcept : v(std::bit_cast<
decltype
(v)>(u8x4{rhs})) {}
42
43
constexpr
uint_abgr8_pack
&operator=(f32x4
const
&rhs)
noexcept
44
{
45
v = std::bit_cast<decltype(v)>(u8x4{rhs});
46
return
*
this
;
47
}
48
49
constexpr
explicit
uint_abgr8_pack
(corner_radii
const
&rhs) noexcept :
uint_abgr8_pack
(
static_cast<
f32x4
>
(rhs)) {}
50
51
[[nodiscard]]
constexpr
friend
bool
operator==(
uint_abgr8_pack
const
&lhs,
uint_abgr8_pack
const
&rhs)
noexcept
=
default
;
52
};
53
54
}
// namespace hi::inline v1
v1
DOXYGEN BUG.
Definition
algorithm.hpp:13
v1::uint_abgr8_pack
4 x uint8_t pixel packed format.
Definition
uint_abgr8_pack.hpp:20
Generated on Mon Apr 22 2024 12:52:45 for HikoGUI by
1.10.0