opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
liboscar
ui
icon.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
liboscar/graphics/texture2d.h
>
4
#include <
liboscar/maths/rect.h
>
5
#include <
liboscar/maths/vector.h
>
6
7
#include <utility>
8
9
namespace
osc
10
{
11
class
Icon
final
{
12
public
:
13
explicit
Icon
(
14
Texture2D
texture
,
15
const
Rect
&
texture_coordinates
) :
16
17
texture_{std::
move
(
texture
)},
18
texture_coordinates_{
texture_coordinates
}
19
{}
20
21
const
Texture2D
&
texture
()
const
{
return
texture_; }
22
23
Vector2
dimensions
()
const
{
return
texture_.
dimensions
(); }
24
25
const
Rect
&
texture_coordinates
()
const
{
return
texture_coordinates_; }
26
27
private
:
28
Texture2D
texture_;
29
Rect
texture_coordinates_;
30
};
31
}
osc::Icon
Definition
icon.h:11
osc::Icon::texture_coordinates
const Rect & texture_coordinates() const
Definition
icon.h:25
osc::Icon::dimensions
Vector2 dimensions() const
Definition
icon.h:23
osc::Icon::texture
const Texture2D & texture() const
Definition
icon.h:21
osc::Icon::Icon
Icon(Texture2D texture, const Rect &texture_coordinates)
Definition
icon.h:13
osc::Rect
Definition
rect.h:17
osc::Texture2D
Definition
texture2d.h:22
osc::Texture2D::dimensions
Vector2 dimensions() const
osc::Vector< float, 2 >
osc
Definition
custom_decoration_generator.h:5
osc::to
constexpr U to(T &&value)
Definition
conversion.h:56
rect.h
texture2d.h
vector.h
Generated by
1.9.8