8#include "../geometry/geometry.hpp"
9#include "../utility/utility.hpp"
10#include "../macros.hpp"
12hi_export_module(hikogui.font.glyph_atlas_info);
14hi_export
namespace hi::inline
v1 {
39 [[nodiscard]]
constexpr bool empty() const noexcept
41 return size == extent2{};
44 [[nodiscard]]
constexpr operator bool() const noexcept
49 constexpr glyph_atlas_info() noexcept = default;
58 constexpr
glyph_atlas_info(
point3 position, extent2 size, scale2 border_scale, scale2 texture_coordinate_scale) noexcept :
61 border_scale(border_scale),
62 texture_coordinates(bounding_rectangle(texture_coordinate_scale * rectangle{position, size}))
64 hi_axiom(position == floor(position));
65 hi_axiom(size == ceil(size));
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
Definition glyph_atlas_info.hpp:16
scale2 border_scale
The scaling factor used for scaling a quad to include the border.
Definition glyph_atlas_info.hpp:31
point3 position
pixel coordinates.
Definition glyph_atlas_info.hpp:23
extent2 size
Size of the glyph in pixels in the texture map.
Definition glyph_atlas_info.hpp:27
aarectangle texture_coordinates
The position and size of the glyph in the texture in UV coordinates.
Definition glyph_atlas_info.hpp:37
A high-level geometric point Part of the high-level vec, point, mat and color types.
Definition point3.hpp:29