Panda3D
Loading...
Searching...
No Matches
panda
src
pnmtext
pnmTextGlyph.h
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 pnmTextGlyph.h
10
* @author drose
11
* @date 2002-04-03
12
*/
13
14
#ifndef PNMTEXTGLYPH_H
15
#define PNMTEXTGLYPH_H
16
17
#include "
pandabase.h
"
18
19
#include "
pnmImage.h
"
20
#include "
vector_int.h
"
21
22
/**
23
* A single glyph in a PNMTextMaker.
24
*/
25
class
EXPCL_PANDA_PNMTEXT
PNMTextGlyph
{
26
PUBLISHED:
27
explicit
PNMTextGlyph
(
double
advance);
28
~PNMTextGlyph
();
29
30
INLINE
int
get_advance()
const
;
31
32
void
place(
PNMImage
&dest_image,
int
xp,
int
yp,
33
const
LColor &fg);
34
void
place(
PNMImage
&dest_image,
int
xp,
int
yp,
35
const
LColor &fg,
const
LColor &interior);
36
37
INLINE
int
get_left()
const
;
38
INLINE
int
get_right()
const
;
39
INLINE
int
get_bottom()
const
;
40
INLINE
int
get_top()
const
;
41
42
INLINE
int
get_height()
const
;
43
INLINE
int
get_width()
const
;
44
INLINE
double
get_value(
int
x,
int
y)
const
;
45
INLINE
bool
get_interior_flag(
int
x,
int
y)
const
;
46
47
private
:
48
void
determine_interior();
49
void
scan_interior(
int
x,
int
y, xelval new_code,
bool
neighbor_dark,
50
int
recurse_level);
51
void
rescale(
double
scale_factor);
52
53
PNMImage
_image;
54
int
_top;
55
int
_left;
56
double
_advance;
57
int
_int_advance;
58
vector_int _scan_interior_points;
59
60
friend
class
PNMTextMaker
;
61
};
62
63
#include "
pnmTextGlyph.I
"
64
65
#endif
PNMImage
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
Definition
pnmImage.h:58
PNMTextGlyph
A single glyph in a PNMTextMaker.
Definition
pnmTextGlyph.h:25
PNMTextMaker
This object uses the Freetype library to generate text directly into an image.
Definition
pnmTextMaker.h:35
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pnmImage.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pnmTextGlyph.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
vector_int.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Mon Jan 8 2024 17:18:44 for Panda3D by
1.10.0