KiCad PCB EDA Suite
Loading...
Searching...
No Matches
gl_resources.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KICAD, a free EDA CAD application.
3
*
4
* Copyright (C) 2016 Kicad Developers, see change_log.txt for contributors.
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (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, you may find one here:
18
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19
* or you may search the http://www.gnu.org website for the version 2 license,
20
* or you may write to the Free Software Foundation, Inc.,
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22
*/
23
24
#ifndef GAL_OPENGL_RESOURCES_H___
25
#define GAL_OPENGL_RESOURCES_H___
26
27
#define BITMAP_FONT_USE_SPANS
28
29
namespace
KIGFX
{
30
31
namespace
BUILTIN_FONT {
32
33
struct
FONT_IMAGE_TYPE
34
{
35
unsigned
int
width
,
height
;
36
unsigned
int
char_border
;
37
unsigned
int
spacing
;
38
unsigned
char
pixels
[1024 * 1024 * 3];
39
};
40
41
struct
FONT_INFO_TYPE
42
{
43
unsigned
int
smooth_pixels
;
44
float
min_y
;
45
float
max_y
;
46
};
47
48
struct
FONT_SPAN_TYPE
49
{
50
unsigned
int
start
;
51
unsigned
int
end
;
52
unsigned
int
cumulative
;
53
};
54
55
struct
FONT_GLYPH_TYPE
56
{
57
unsigned
int
atlas_x
,
atlas_y
;
58
unsigned
int
atlas_w
,
atlas_h
;
59
float
minx
,
maxx
;
60
float
miny
,
maxy
;
61
float
advance
;
62
};
63
64
extern
FONT_IMAGE_TYPE
font_image
;
65
extern
FONT_INFO_TYPE
font_information
;
66
67
const
FONT_GLYPH_TYPE
*
LookupGlyph
(
unsigned
int
aCodePoint );
68
69
}
70
71
}
72
73
#endif
KIGFX::BUILTIN_FONT::font_image
FONT_IMAGE_TYPE font_image
KIGFX::BUILTIN_FONT::LookupGlyph
const FONT_GLYPH_TYPE * LookupGlyph(unsigned int aCodepoint)
Definition:
gl_resources.cpp:37
KIGFX::BUILTIN_FONT::font_information
FONT_INFO_TYPE font_information
KIGFX
The Cairo implementation of the graphics abstraction layer.
Definition:
color4d.cpp:247
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE
Definition:
gl_resources.h:56
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::atlas_w
unsigned int atlas_w
Definition:
gl_resources.h:58
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::maxx
float maxx
Definition:
gl_resources.h:59
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::atlas_y
unsigned int atlas_y
Definition:
gl_resources.h:57
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::miny
float miny
Definition:
gl_resources.h:60
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::atlas_h
unsigned int atlas_h
Definition:
gl_resources.h:58
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::minx
float minx
Definition:
gl_resources.h:59
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::maxy
float maxy
Definition:
gl_resources.h:60
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::atlas_x
unsigned int atlas_x
Definition:
gl_resources.h:57
KIGFX::BUILTIN_FONT::FONT_GLYPH_TYPE::advance
float advance
Definition:
gl_resources.h:61
KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE
Definition:
gl_resources.h:34
KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::width
unsigned int width
Definition:
gl_resources.h:35
KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::char_border
unsigned int char_border
Definition:
gl_resources.h:36
KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::spacing
unsigned int spacing
Definition:
gl_resources.h:37
KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::height
unsigned int height
Definition:
gl_resources.h:35
KIGFX::BUILTIN_FONT::FONT_IMAGE_TYPE::pixels
unsigned char pixels[1024 *1024 *3]
Definition:
gl_resources.h:38
KIGFX::BUILTIN_FONT::FONT_INFO_TYPE
Definition:
gl_resources.h:42
KIGFX::BUILTIN_FONT::FONT_INFO_TYPE::max_y
float max_y
Definition:
gl_resources.h:45
KIGFX::BUILTIN_FONT::FONT_INFO_TYPE::smooth_pixels
unsigned int smooth_pixels
Definition:
gl_resources.h:43
KIGFX::BUILTIN_FONT::FONT_INFO_TYPE::min_y
float min_y
Definition:
gl_resources.h:44
KIGFX::BUILTIN_FONT::FONT_SPAN_TYPE
Definition:
gl_resources.h:49
KIGFX::BUILTIN_FONT::FONT_SPAN_TYPE::start
unsigned int start
Definition:
gl_resources.h:50
KIGFX::BUILTIN_FONT::FONT_SPAN_TYPE::end
unsigned int end
Definition:
gl_resources.h:51
KIGFX::BUILTIN_FONT::FONT_SPAN_TYPE::cumulative
unsigned int cumulative
Definition:
gl_resources.h:52
src
common
gal
opengl
gl_resources.h
Generated on Sun Dec 22 2024 00:05:18 for KiCad PCB EDA Suite by
1.9.6