HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
TTauri
Cells
Image.hpp
1
// Copyright 2020 Pokitec
2
// All rights reserved.
3
4
#pragma once
5
6
#include "TTauri/Foundation/URL.hpp"
7
#include "TTauri/Foundation/PixelMap.hpp"
8
#include "TTauri/Foundation/R16G16B16A16SFloat.hpp"
9
#include "TTauri/Text/FontGlyphIDs.hpp"
10
#include "TTauri/Cells/ImageCell.hpp"
11
#include <variant>
12
13
namespace
tt {
14
class
DrawContext;
15
18
class
Image
{
19
public
:
20
using
image_type = std::variant<FontGlyphIDs,PixelMap<R16G16B16A16SFloat>>;
21
22
image_type image;
23
public
:
24
Image
(
URL
const
&url);
25
Image
(
PixelMap<R16G16B16A16SFloat>
&&image)
noexcept
;
26
Image
(
FontGlyphIDs
const
&glyph)
noexcept
;
27
28
Image
() =
default
;
29
Image
(
Image
const
&)
noexcept
;
30
Image
(
Image
&&)
noexcept
=
default
;
31
Image
&operator=(
Image
const
&)
noexcept
;
32
Image
&operator=(
Image
&&)
noexcept
=
default
;
33
34
[[nodiscard]]
std::unique_ptr<ImageCell>
makeCell()
const
noexcept
;
35
};
36
37
38
}
tt::Image
An image, in different formats.
Definition
Image.hpp:18
tt::PixelMap
A 2D canvas of pixels.
Definition
PixelMap.hpp:83
tt::URL
Definition
URL.hpp:45
tt::FontGlyphIDs
Definition
FontGlyphIDs.hpp:77
std::unique_ptr
Generated on Mon Apr 22 2024 12:53:55 for HikoGUI by
1.10.0