neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
i_glyph.hpp
Go to the documentation of this file.
1
// i_glyph.hpp
2
/*
3
neogfx C++ App/Game Engine
4
Copyright (c) 2015, 2020 Leigh Johnston. All Rights Reserved.
5
6
This program is free software: you can redistribute it and / or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <
neogfx/neogfx.hpp
>
23
#include <
neogfx/core/geometrical.hpp
>
24
#include <
neogfx/gfx/i_sub_texture.hpp
>
25
26
namespace
neogfx
27
{
28
enum class
glyph_pixel_mode
: uint32_t
29
{
30
None
,
31
Mono
,
32
Gray2Bit
,
33
Gray4Bit
,
34
Gray8Bit
,
35
Gray
=
Gray8Bit
,
36
LCD
,
37
LCD_V
,
38
BGRA
39
};
40
41
struct
glyph_metrics
42
{
43
vec2
extents
;
44
vec2
bearing
;
45
};
46
47
class
i_glyph
48
{
49
public
:
50
virtual
~i_glyph
() =
default
;
51
public
:
52
virtual
const
i_sub_texture
&
texture
()
const
= 0;
53
virtual
bool
subpixel
()
const
= 0;
54
virtual
const
glyph_metrics
&
metrics
()
const
= 0;
55
virtual
glyph_pixel_mode
pixel_mode
()
const
= 0;
56
};
57
}
neogfx::i_glyph
Definition
i_glyph.hpp:48
neogfx::i_glyph::texture
virtual const i_sub_texture & texture() const =0
neogfx::i_glyph::pixel_mode
virtual glyph_pixel_mode pixel_mode() const =0
neogfx::i_glyph::metrics
virtual const glyph_metrics & metrics() const =0
neogfx::i_glyph::~i_glyph
virtual ~i_glyph()=default
neogfx::i_glyph::subpixel
virtual bool subpixel() const =0
neogfx::i_sub_texture
Definition
i_sub_texture.hpp:28
neolib::math::basic_vector
Definition
numerical.hpp:112
geometrical.hpp
i_sub_texture.hpp
neogfx
Definition
action.hpp:28
neogfx::glyph_pixel_mode
glyph_pixel_mode
Definition
i_glyph.hpp:29
neogfx::glyph_pixel_mode::Gray8Bit
@ Gray8Bit
neogfx::glyph_pixel_mode::Gray2Bit
@ Gray2Bit
neogfx::glyph_pixel_mode::BGRA
@ BGRA
neogfx::glyph_pixel_mode::LCD_V
@ LCD_V
neogfx::glyph_pixel_mode::Gray
@ Gray
neogfx::glyph_pixel_mode::Gray4Bit
@ Gray4Bit
neogfx::glyph_pixel_mode::LCD
@ LCD
neogfx::audio_channel::Mono
@ Mono
neogfx::drop_operation::None
@ None
neogfx.hpp
neogfx::glyph_metrics
Definition
i_glyph.hpp:42
neogfx::glyph_metrics::extents
vec2 extents
Definition
i_glyph.hpp:43
neogfx::glyph_metrics::bearing
vec2 bearing
Definition
i_glyph.hpp:44
include
neogfx
gfx
text
i_glyph.hpp
Generated by
1.9.8