Panda3D
panda
src
pnmtext
config_pnmtext.cxx
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file config_pnmtext.cxx
10
* @author drose
11
* @date 2003-09-08
12
*/
13
14
#include "
config_pnmtext.h
"
15
16
#include "
dconfig.h
"
17
#include "
freetypeFace.h
"
18
19
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_PNMTEXT)
20
#error Buildsystem error: BUILDING_PANDA_PNMTEXT not defined
21
#endif
22
23
Configure(config_pnmtext);
24
NotifyCategoryDef(pnmtext,
""
);
25
26
ConfigureFn(config_pnmtext) {
27
init_libpnmtext
();
28
}
29
30
ConfigVariableDouble
text_point_size
31
(
"text-point-size"
, 10.0);
32
ConfigVariableDouble
text_pixels_per_unit
33
(
"text-pixels-per-unit"
, 40.0);
34
ConfigVariableDouble
text_scale_factor
35
(
"text-scale-factor"
, 2.0);
36
ConfigVariableBool
text_native_antialias
37
(
"text-native-antialias"
,
true
);
38
39
/**
40
* Initializes the library. This must be called at least once before any of
41
* the functions or classes in this library can be used. Normally it will be
42
* called by the static initializers and need not be called explicitly, but
43
* special cases exist.
44
*/
45
void
46
init_libpnmtext
() {
47
static
bool
initialized =
false
;
48
if
(initialized) {
49
return
;
50
}
51
initialized =
true
;
52
53
FreetypeFace::init_type();
54
}
ConfigVariableBool
This is a convenience class to specialize ConfigVariable as a boolean type.
Definition:
configVariableBool.h:23
ConfigVariableDouble
This is a convenience class to specialize ConfigVariable as a floating- point type.
Definition:
configVariableDouble.h:24
init_libpnmtext
void init_libpnmtext()
Initializes the library.
Definition:
config_pnmtext.cxx:46
config_pnmtext.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
dconfig.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
freetypeFace.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Tue Aug 31 2021 11:10:23 for Panda3D by
1.9.1