mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 20:22:33 -06:00
1049 lines
53 KiB
Text
1049 lines
53 KiB
Text
1412103275
|
|
2 2
|
|
12 libp3pnmtext 4 g64k 12 panda3d.core
|
|
42
|
|
45 13 ~FreetypeFont 0 4 87 27 FreetypeFont::~FreetypeFont 0 0 709
|
|
// Filename: freetypeFont.I
|
|
// Created by: drose (07Sep03)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// PANDA 3D SOFTWARE
|
|
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
|
//
|
|
// All use of this software is subject to the terms of the revised BSD
|
|
// license. You should have received a copy of this license along
|
|
// with this source code in a file named "LICENSE."
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::Destructor
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
41
|
|
inline FreetypeFont::~FreetypeFont(void);
|
|
|
|
46 14 set_point_size 0 4 87 28 FreetypeFont::set_point_size 0 1 1 585
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_point_size
|
|
// Access: Public
|
|
// Description: Sets the point size of the font. This controls the
|
|
// apparent size of the font onscreen. By convention, a
|
|
// 10 point font is about 1 screen unit high.
|
|
//
|
|
// This should only be called before any characters have
|
|
// been requested out of the font, or immediately after
|
|
// calling clear().
|
|
////////////////////////////////////////////////////////////////////
|
|
59
|
|
inline bool FreetypeFont::set_point_size(float point_size);
|
|
|
|
47 14 get_point_size 0 4 87 28 FreetypeFont::get_point_size 0 1 2 260
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_point_size
|
|
// Access: Public
|
|
// Description: Returns the point size of the font.
|
|
////////////////////////////////////////////////////////////////////
|
|
54
|
|
inline float FreetypeFont::get_point_size(void) const;
|
|
|
|
48 19 set_pixels_per_unit 0 4 87 33 FreetypeFont::set_pixels_per_unit 0 1 3 770
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_pixels_per_unit
|
|
// Access: Public
|
|
// Description: Set the resolution of the texture map, and hence the
|
|
// clarity of the resulting font. This sets the number
|
|
// of pixels in the texture map that are used for each
|
|
// onscreen unit.
|
|
//
|
|
// Setting this number larger results in an easier to
|
|
// read font, but at the cost of more texture memory.
|
|
//
|
|
// This should only be called before any characters have
|
|
// been requested out of the font, or immediately after
|
|
// calling clear().
|
|
////////////////////////////////////////////////////////////////////
|
|
69
|
|
inline bool FreetypeFont::set_pixels_per_unit(float pixels_per_unit);
|
|
|
|
49 19 get_pixels_per_unit 0 4 87 33 FreetypeFont::get_pixels_per_unit 0 1 4 317
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_pixels_per_unit
|
|
// Access: Public
|
|
// Description: Returns the resolution of the texture map. See
|
|
// set_pixels_per_unit().
|
|
////////////////////////////////////////////////////////////////////
|
|
59
|
|
inline float FreetypeFont::get_pixels_per_unit(void) const;
|
|
|
|
50 14 set_pixel_size 0 4 87 28 FreetypeFont::set_pixel_size 0 1 5 456
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_pixel_size
|
|
// Access: Public
|
|
// Description: Computes the appropriate pixels_per_unit value to set
|
|
// the size of the font in the texture to the indicated
|
|
// number of pixels. This is just another way to
|
|
// specify pixels_per_unit().
|
|
////////////////////////////////////////////////////////////////////
|
|
59
|
|
inline bool FreetypeFont::set_pixel_size(float pixel_size);
|
|
|
|
51 14 get_pixel_size 0 4 87 28 FreetypeFont::get_pixel_size 0 1 6 311
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_pixel_size
|
|
// Access: Public
|
|
// Description: Returns the size of the font in pixels, as it appears
|
|
// in the texture.
|
|
////////////////////////////////////////////////////////////////////
|
|
54
|
|
inline float FreetypeFont::get_pixel_size(void) const;
|
|
|
|
52 16 set_scale_factor 0 4 87 30 FreetypeFont::set_scale_factor 0 1 7 930
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_scale_factor
|
|
// Access: Public
|
|
// Description: Sets the factor by which the font is rendered larger
|
|
// by the FreeType library before being filtered down to
|
|
// its actual size in the texture as specified by
|
|
// set_pixels_per_unit(). This may be set to a number
|
|
// larger than 1.0 to improve the font's antialiasing
|
|
// (since FreeType doesn't really do a swell job of
|
|
// antialiasing by itself). There is some performance
|
|
// implication for setting this different than 1.0.
|
|
//
|
|
// This should only be called before any characters have
|
|
// been requested out of the font, or immediately after
|
|
// calling clear().
|
|
////////////////////////////////////////////////////////////////////
|
|
63
|
|
inline bool FreetypeFont::set_scale_factor(float scale_factor);
|
|
|
|
53 16 get_scale_factor 0 4 87 30 FreetypeFont::get_scale_factor 0 1 8 307
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_scale_factor
|
|
// Access: Public
|
|
// Description: Returns the antialiasing scale factor. See
|
|
// set_scale_factor().
|
|
////////////////////////////////////////////////////////////////////
|
|
56
|
|
inline float FreetypeFont::get_scale_factor(void) const;
|
|
|
|
54 20 set_native_antialias 0 4 87 34 FreetypeFont::set_native_antialias 0 1 9 827
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_native_antialias
|
|
// Access: Public
|
|
// Description: Sets whether the Freetype library's built-in
|
|
// antialias mode is enabled. There are two unrelated
|
|
// ways to achieve antialiasing: with Freetype's native
|
|
// antialias mode, and with the use of a scale_factor
|
|
// greater than one. By default, both modes are
|
|
// enabled.
|
|
//
|
|
// At low resolutions, some fonts may do better with one
|
|
// mode or the other. In general, Freetype's native
|
|
// antialiasing will produce less blurry results, but
|
|
// may introduce more artifacts.
|
|
////////////////////////////////////////////////////////////////////
|
|
70
|
|
inline void FreetypeFont::set_native_antialias(bool native_antialias);
|
|
|
|
55 20 get_native_antialias 0 4 87 34 FreetypeFont::get_native_antialias 0 1 10 339
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_native_antialias
|
|
// Access: Public
|
|
// Description: Returns whether Freetype's built-in antialias mode is
|
|
// enabled. See set_native_antialias().
|
|
////////////////////////////////////////////////////////////////////
|
|
59
|
|
inline bool FreetypeFont::get_native_antialias(void) const;
|
|
|
|
56 19 get_font_pixel_size 0 4 87 33 FreetypeFont::get_font_pixel_size 0 1 11 709
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_font_pixel_size
|
|
// Access: Public
|
|
// Description: This is used to report whether the requested pixel
|
|
// size is being only approximated by a fixed-pixel-size
|
|
// font. This returns 0 in the normal case, in which a
|
|
// scalable font is used, or the fixed-pixel-size font
|
|
// has exactly the requested pixel size.
|
|
//
|
|
// If this returns non-zero, it is the pixel size of the
|
|
// font that we are using to approximate our desired
|
|
// size.
|
|
////////////////////////////////////////////////////////////////////
|
|
57
|
|
inline int FreetypeFont::get_font_pixel_size(void) const;
|
|
|
|
57 15 get_line_height 0 4 87 29 FreetypeFont::get_line_height 0 1 12 297
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_line_height
|
|
// Access: Public
|
|
// Description: Returns the number of units high each line of text
|
|
// is.
|
|
////////////////////////////////////////////////////////////////////
|
|
55
|
|
inline float FreetypeFont::get_line_height(void) const;
|
|
|
|
58 17 get_space_advance 0 4 87 31 FreetypeFont::get_space_advance 0 1 13 272
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_space_advance
|
|
// Access: Public
|
|
// Description: Returns the number of units wide a space is.
|
|
////////////////////////////////////////////////////////////////////
|
|
57
|
|
inline float FreetypeFont::get_space_advance(void) const;
|
|
|
|
59 19 get_points_per_unit 0 4 87 33 FreetypeFont::get_points_per_unit 0 1 14 404
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_points_per_unit
|
|
// Access: Public, Static
|
|
// Description: Returns the point size of the font that is one Panda
|
|
// unit high. This is an arbitrary Panda convention for
|
|
// text, and is set to 10.0.
|
|
////////////////////////////////////////////////////////////////////
|
|
60
|
|
static inline float FreetypeFont::get_points_per_unit(void);
|
|
|
|
60 19 get_points_per_inch 0 4 87 33 FreetypeFont::get_points_per_inch 0 1 15 341
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_points_per_inch
|
|
// Access: Public, Static
|
|
// Description: Returns the number of points in one inch. This is a
|
|
// universal typographic convention.
|
|
////////////////////////////////////////////////////////////////////
|
|
60
|
|
static inline float FreetypeFont::get_points_per_inch(void);
|
|
|
|
61 12 PNMTextGlyph 0 4 89 26 PNMTextGlyph::PNMTextGlyph 0 1 16 222
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::Constructor
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
43
|
|
PNMTextGlyph::PNMTextGlyph(double advance);
|
|
|
|
62 13 ~PNMTextGlyph 0 4 89 27 PNMTextGlyph::~PNMTextGlyph 0 0 221
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::Destructor
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
34
|
|
PNMTextGlyph::~PNMTextGlyph(void);
|
|
|
|
63 11 get_advance 0 4 89 25 PNMTextGlyph::get_advance 0 1 17 819
|
|
// Filename: pnmTextGlyph.I
|
|
// Created by: drose (07Sep03)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// PANDA 3D SOFTWARE
|
|
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
|
//
|
|
// All use of this software is subject to the terms of the revised BSD
|
|
// license. You should have received a copy of this license along
|
|
// with this source code in a file named "LICENSE."
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_advance
|
|
// Access: Public
|
|
// Description: Returns the number of pixels by which the pen should
|
|
// be advanced after rendering this glyph.
|
|
////////////////////////////////////////////////////////////////////
|
|
49
|
|
inline int PNMTextGlyph::get_advance(void) const;
|
|
|
|
64 5 place 0 4 89 19 PNMTextGlyph::place 0 2 18 19 948
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::place
|
|
// Access: Public
|
|
// Description: Copies the glyph to the indicated destination image
|
|
// at the indicated origin. It colors the glyph pixels
|
|
// the indicated foreground color, blends antialiased
|
|
// pixels with the appropriate amount of the foreground
|
|
// color and the existing background color, and leaves
|
|
// other pixels alone.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::place
|
|
// Access: Public
|
|
// Description: This flavor of place() also fills in the interior
|
|
// color. This requires that determine_interior was
|
|
// called earlier.
|
|
////////////////////////////////////////////////////////////////////
|
|
199
|
|
void PNMTextGlyph::place(PNMImage &dest_image, int xp, int yp, LVecBase4f const &fg);
|
|
void PNMTextGlyph::place(PNMImage &dest_image, int xp, int yp, LVecBase4f const &fg, LVecBase4f const &interior);
|
|
|
|
65 8 get_left 0 4 89 22 PNMTextGlyph::get_left 0 1 20 296
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_left
|
|
// Access: Public
|
|
// Description: Returns the x coordinate of the leftmost pixel in the
|
|
// glyph.
|
|
////////////////////////////////////////////////////////////////////
|
|
46
|
|
inline int PNMTextGlyph::get_left(void) const;
|
|
|
|
66 9 get_right 0 4 89 23 PNMTextGlyph::get_right 0 1 21 298
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_right
|
|
// Access: Public
|
|
// Description: Returns the x coordinate of the rightmost pixel in the
|
|
// glyph.
|
|
////////////////////////////////////////////////////////////////////
|
|
47
|
|
inline int PNMTextGlyph::get_right(void) const;
|
|
|
|
67 10 get_bottom 0 4 89 24 PNMTextGlyph::get_bottom 0 1 22 300
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_bottom
|
|
// Access: Public
|
|
// Description: Returns the y coordinate of the bottommost pixel in
|
|
// the glyph.
|
|
////////////////////////////////////////////////////////////////////
|
|
48
|
|
inline int PNMTextGlyph::get_bottom(void) const;
|
|
|
|
68 7 get_top 0 4 89 21 PNMTextGlyph::get_top 0 1 23 294
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_top
|
|
// Access: Public
|
|
// Description: Returns the y coordinate of the topmost pixel in the
|
|
// glyph.
|
|
////////////////////////////////////////////////////////////////////
|
|
45
|
|
inline int PNMTextGlyph::get_top(void) const;
|
|
|
|
69 10 get_height 0 4 89 24 PNMTextGlyph::get_height 0 1 24 263
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_height
|
|
// Access: Public
|
|
// Description: Returns the height of the glyph in pixels.
|
|
////////////////////////////////////////////////////////////////////
|
|
48
|
|
inline int PNMTextGlyph::get_height(void) const;
|
|
|
|
70 9 get_width 0 4 89 23 PNMTextGlyph::get_width 0 1 25 261
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_width
|
|
// Access: Public
|
|
// Description: Returns the width of the glyph in pixels.
|
|
////////////////////////////////////////////////////////////////////
|
|
47
|
|
inline int PNMTextGlyph::get_width(void) const;
|
|
|
|
71 9 get_value 0 4 89 23 PNMTextGlyph::get_value 0 1 26 512
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_value
|
|
// Access: Public
|
|
// Description: Returns the value of the indicated pixel of the
|
|
// glyph. The result is in the range [0, 1], where 0
|
|
// indicates the pixel is not part of the glyph, and 1
|
|
// indicates it is. Intermediate values are used to
|
|
// represent antialiasing.
|
|
////////////////////////////////////////////////////////////////////
|
|
58
|
|
inline double PNMTextGlyph::get_value(int x, int y) const;
|
|
|
|
72 17 get_interior_flag 0 4 89 31 PNMTextGlyph::get_interior_flag 0 1 27 367
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_interior_flag
|
|
// Access: Public
|
|
// Description: Returns true if the indicated pixel represents a
|
|
// pixel in the interior of a hollow font, false
|
|
// otherwise.
|
|
////////////////////////////////////////////////////////////////////
|
|
64
|
|
inline bool PNMTextGlyph::get_interior_flag(int x, int y) const;
|
|
|
|
73 12 PNMTextMaker 0 4 90 26 PNMTextMaker::PNMTextMaker 0 3 28 29 30 1030
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::Constructor
|
|
// Access: Public
|
|
// Description: The constructor expects the name of some font file
|
|
// that FreeType can read, along with face_index,
|
|
// indicating which font within the file to load
|
|
// (usually 0).
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::Constructor
|
|
// Access: Public
|
|
// Description: This constructor works as above, but it takes the
|
|
// font data from an in-memory buffer instead of from a
|
|
// named file.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::Copy Constructor
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
212
|
|
PNMTextMaker::PNMTextMaker(Filename const &font_filename, int face_index);
|
|
PNMTextMaker::PNMTextMaker(char const *font_data, int data_length, int face_index);
|
|
PNMTextMaker::PNMTextMaker(PNMTextMaker const ©);
|
|
|
|
74 13 ~PNMTextMaker 0 4 90 27 PNMTextMaker::~PNMTextMaker 0 0 221
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::Destructor
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
34
|
|
PNMTextMaker::~PNMTextMaker(void);
|
|
|
|
75 8 is_valid 0 4 90 22 PNMTextMaker::is_valid 0 1 31 810
|
|
// Filename: pnmTextMaker.I
|
|
// Created by: drose (07Sep03)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// PANDA 3D SOFTWARE
|
|
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
|
//
|
|
// All use of this software is subject to the terms of the revised BSD
|
|
// license. You should have received a copy of this license along
|
|
// with this source code in a file named "LICENSE."
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::is_valid
|
|
// Access: Public
|
|
// Description: Returns true if the PNMTextMaker is valid and ready to
|
|
// generate text, false otherwise.
|
|
////////////////////////////////////////////////////////////////////
|
|
47
|
|
inline bool PNMTextMaker::is_valid(void) const;
|
|
|
|
76 9 set_align 0 4 90 23 PNMTextMaker::set_align 0 1 32 222
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::set_align
|
|
// Access: Published
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
72
|
|
inline void PNMTextMaker::set_align(PNMTextMaker::Alignment align_type);
|
|
|
|
77 9 get_align 0 4 90 23 PNMTextMaker::get_align 0 1 33 222
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_align
|
|
// Access: Published
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
67
|
|
inline PNMTextMaker::Alignment PNMTextMaker::get_align(void) const;
|
|
|
|
78 17 set_interior_flag 0 4 90 31 PNMTextMaker::set_interior_flag 0 1 34 785
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::set_interior_flag
|
|
// Access: Published
|
|
// Description: Sets the flag that indicates whether the interior of
|
|
// hollow fonts is identified as a preprocess as each
|
|
// glyph is loaded. If this flag is true, you may
|
|
// specify an interior color along with a fg and bg
|
|
// color when you place text; if the flag is false, the
|
|
// interior color is ignored.
|
|
//
|
|
// It is generally best to set_native_antialias(0) when
|
|
// using this feature. Also, this works best when the
|
|
// pixel size is not very small.
|
|
////////////////////////////////////////////////////////////////////
|
|
64
|
|
inline void PNMTextMaker::set_interior_flag(bool interior_flag);
|
|
|
|
79 17 get_interior_flag 0 4 90 31 PNMTextMaker::get_interior_flag 0 1 35 230
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_interior_flag
|
|
// Access: Published
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
56
|
|
inline bool PNMTextMaker::get_interior_flag(void) const;
|
|
|
|
80 6 set_fg 0 4 90 20 PNMTextMaker::set_fg 0 1 36 436
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::set_fg
|
|
// Access: Published
|
|
// Description: Sets the foreground color of text that will be
|
|
// generated by future calls to generate_into(). This
|
|
// is the color that all of the "on" pixels in the font
|
|
// will show as.
|
|
////////////////////////////////////////////////////////////////////
|
|
55
|
|
inline void PNMTextMaker::set_fg(LVecBase4f const &fg);
|
|
|
|
81 6 get_fg 0 4 90 20 PNMTextMaker::get_fg 0 1 37 332
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_fg
|
|
// Access: Published
|
|
// Description: Returns the foreground color of text that will be
|
|
// generated by future calls to generate_into().
|
|
////////////////////////////////////////////////////////////////////
|
|
58
|
|
inline LVecBase4f const &PNMTextMaker::get_fg(void) const;
|
|
|
|
82 12 set_interior 0 4 90 26 PNMTextMaker::set_interior 0 1 38 443
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::set_interior
|
|
// Access: Published
|
|
// Description: Sets the color that will be used to render the
|
|
// interior portions of hollow fonts in future calls to
|
|
// generate_into(). This is respected only if
|
|
// interior_flag is true.
|
|
////////////////////////////////////////////////////////////////////
|
|
67
|
|
inline void PNMTextMaker::set_interior(LVecBase4f const &interior);
|
|
|
|
83 12 get_interior 0 4 90 26 PNMTextMaker::get_interior 0 1 39 327
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_interior
|
|
// Access: Published
|
|
// Description: Returns the color that will be used to render the
|
|
// interior portions of hollow fonts.
|
|
////////////////////////////////////////////////////////////////////
|
|
64
|
|
inline LVecBase4f const &PNMTextMaker::get_interior(void) const;
|
|
|
|
84 13 generate_into 0 4 90 27 PNMTextMaker::generate_into 0 2 40 41 778
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::generate_into
|
|
// Access: Public
|
|
// Description: Generates a single line of text into the indicated
|
|
// image at the indicated position; the return value is
|
|
// the total width in pixels.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::generate_into
|
|
// Access: Public
|
|
// Description: Generates a single line of text into the indicated
|
|
// image at the indicated position; the return value is
|
|
// the total width in pixels.
|
|
////////////////////////////////////////////////////////////////////
|
|
215
|
|
inline int PNMTextMaker::generate_into(basic_string< char > const &text, PNMImage &dest_image, int x, int y);
|
|
int PNMTextMaker::generate_into(basic_string< wchar_t > const &text, PNMImage &dest_image, int x, int y);
|
|
|
|
85 10 calc_width 0 4 90 24 PNMTextMaker::calc_width 0 2 42 43 594
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::calc_width
|
|
// Access: Public
|
|
// Description: Returns the width in pixels of the indicated line of
|
|
// text.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::calc_width
|
|
// Access: Public
|
|
// Description: Returns the width in pixels of the indicated line of
|
|
// text.
|
|
////////////////////////////////////////////////////////////////////
|
|
137
|
|
inline int PNMTextMaker::calc_width(basic_string< char > const &text);
|
|
int PNMTextMaker::calc_width(basic_string< wchar_t > const &text);
|
|
|
|
86 9 get_glyph 0 4 90 23 PNMTextMaker::get_glyph 0 1 44 321
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_glyph
|
|
// Access: Public
|
|
// Description: Returns the glyph for the indicated index, or NULL if
|
|
// it is not defined in the font.
|
|
////////////////////////////////////////////////////////////////////
|
|
53
|
|
PNMTextGlyph *PNMTextMaker::get_glyph(int character);
|
|
|
|
44
|
|
1 14 Dtool_g64krq_A 0 6 4 94 0 14 Dtool_g64krq_A 585 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_point_size
|
|
// Access: Public
|
|
// Description: Sets the point size of the font. This controls the
|
|
// apparent size of the font onscreen. By convention, a
|
|
// 10 point font is about 1 screen unit high.
|
|
//
|
|
// This should only be called before any characters have
|
|
// been requested out of the font, or immediately after
|
|
// calling clear().
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 92 10 point_size 1 93
|
|
2 14 Dtool_g64km_c2 0 6 5 93 0 14 Dtool_g64km_c2 260 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_point_size
|
|
// Access: Public
|
|
// Description: Returns the point size of the font.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 95
|
|
3 14 Dtool_g64kdi3p 0 6 6 94 0 14 Dtool_g64kdi3p 770 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_pixels_per_unit
|
|
// Access: Public
|
|
// Description: Set the resolution of the texture map, and hence the
|
|
// clarity of the resulting font. This sets the number
|
|
// of pixels in the texture map that are used for each
|
|
// onscreen unit.
|
|
//
|
|
// Setting this number larger results in an easier to
|
|
// read font, but at the cost of more texture memory.
|
|
//
|
|
// This should only be called before any characters have
|
|
// been requested out of the font, or immediately after
|
|
// calling clear().
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 92 15 pixels_per_unit 1 93
|
|
4 14 Dtool_g64kai5U 0 6 7 93 0 14 Dtool_g64kai5U 317 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_pixels_per_unit
|
|
// Access: Public
|
|
// Description: Returns the resolution of the texture map. See
|
|
// set_pixels_per_unit().
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 95
|
|
5 14 Dtool_g64kBSHq 0 6 8 94 0 14 Dtool_g64kBSHq 456 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_pixel_size
|
|
// Access: Public
|
|
// Description: Computes the appropriate pixels_per_unit value to set
|
|
// the size of the font in the texture to the indicated
|
|
// number of pixels. This is just another way to
|
|
// specify pixels_per_unit().
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 92 10 pixel_size 1 93
|
|
6 14 Dtool_g64kDHmf 0 6 9 93 0 14 Dtool_g64kDHmf 311 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_pixel_size
|
|
// Access: Public
|
|
// Description: Returns the size of the font in pixels, as it appears
|
|
// in the texture.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 95
|
|
7 14 Dtool_g64kqpYX 0 6 10 94 0 14 Dtool_g64kqpYX 930 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_scale_factor
|
|
// Access: Public
|
|
// Description: Sets the factor by which the font is rendered larger
|
|
// by the FreeType library before being filtered down to
|
|
// its actual size in the texture as specified by
|
|
// set_pixels_per_unit(). This may be set to a number
|
|
// larger than 1.0 to improve the font's antialiasing
|
|
// (since FreeType doesn't really do a swell job of
|
|
// antialiasing by itself). There is some performance
|
|
// implication for setting this different than 1.0.
|
|
//
|
|
// This should only be called before any characters have
|
|
// been requested out of the font, or immediately after
|
|
// calling clear().
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 92 12 scale_factor 1 93
|
|
8 14 Dtool_g64kO5fA 0 6 11 93 0 14 Dtool_g64kO5fA 307 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_scale_factor
|
|
// Access: Public
|
|
// Description: Returns the antialiasing scale factor. See
|
|
// set_scale_factor().
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 95
|
|
9 14 Dtool_g64kIE7J 0 4 12 97 0 14 Dtool_g64kIE7J 827 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::set_native_antialias
|
|
// Access: Public
|
|
// Description: Sets whether the Freetype library's built-in
|
|
// antialias mode is enabled. There are two unrelated
|
|
// ways to achieve antialiasing: with Freetype's native
|
|
// antialias mode, and with the use of a scale_factor
|
|
// greater than one. By default, both modes are
|
|
// enabled.
|
|
//
|
|
// At low resolutions, some fonts may do better with one
|
|
// mode or the other. In general, Freetype's native
|
|
// antialiasing will produce less blurry results, but
|
|
// may introduce more artifacts.
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 92 16 native_antialias 1 94
|
|
10 14 Dtool_g64kAUYP 0 6 13 94 0 14 Dtool_g64kAUYP 339 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_native_antialias
|
|
// Access: Public
|
|
// Description: Returns whether Freetype's built-in antialias mode is
|
|
// enabled. See set_native_antialias().
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 95
|
|
11 14 Dtool_g64knG_N 0 6 14 98 0 14 Dtool_g64knG_N 709 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_font_pixel_size
|
|
// Access: Public
|
|
// Description: This is used to report whether the requested pixel
|
|
// size is being only approximated by a fixed-pixel-size
|
|
// font. This returns 0 in the normal case, in which a
|
|
// scalable font is used, or the fixed-pixel-size font
|
|
// has exactly the requested pixel size.
|
|
//
|
|
// If this returns non-zero, it is the pixel size of the
|
|
// font that we are using to approximate our desired
|
|
// size.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 95
|
|
12 14 Dtool_g64k8adn 0 6 15 93 0 14 Dtool_g64k8adn 297 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_line_height
|
|
// Access: Public
|
|
// Description: Returns the number of units high each line of text
|
|
// is.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 95
|
|
13 14 Dtool_g64kpqVj 0 6 16 93 0 14 Dtool_g64kpqVj 272 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_space_advance
|
|
// Access: Public
|
|
// Description: Returns the number of units wide a space is.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 95
|
|
14 14 Dtool_g64k1C87 0 6 17 93 0 14 Dtool_g64k1C87 404 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_points_per_unit
|
|
// Access: Public, Static
|
|
// Description: Returns the point size of the font that is one Panda
|
|
// unit high. This is an arbitrary Panda convention for
|
|
// text, and is set to 10.0.
|
|
//////////////////////////////////////////////////////////////////// 0
|
|
15 14 Dtool_g64kf0K8 0 6 18 93 0 14 Dtool_g64kf0K8 341 ////////////////////////////////////////////////////////////////////
|
|
// Function: FreetypeFont::get_points_per_inch
|
|
// Access: Public, Static
|
|
// Description: Returns the number of points in one inch. This is a
|
|
// universal typographic convention.
|
|
//////////////////////////////////////////////////////////////////// 0
|
|
16 14 Dtool_g64kqxLg 0 7 20 100 62 14 Dtool_g64kqxLg 222 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::Constructor
|
|
// Access: Public
|
|
// Description:
|
|
//////////////////////////////////////////////////////////////////// 1 7 advance 1 99
|
|
17 14 Dtool_g64k1ocK 0 6 22 98 0 14 Dtool_g64k1ocK 819 // Filename: pnmTextGlyph.I
|
|
// Created by: drose (07Sep03)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// PANDA 3D SOFTWARE
|
|
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
|
//
|
|
// All use of this software is subject to the terms of the revised BSD
|
|
// license. You should have received a copy of this license along
|
|
// with this source code in a file named "LICENSE."
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_advance
|
|
// Access: Public
|
|
// Description: Returns the number of pixels by which the pen should
|
|
// be advanced after rendering this glyph.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 101
|
|
18 14 Dtool_g64kKamC 0 4 23 97 0 14 Dtool_g64kKamC 581 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::place
|
|
// Access: Public
|
|
// Description: Copies the glyph to the indicated destination image
|
|
// at the indicated origin. It colors the glyph pixels
|
|
// the indicated foreground color, blends antialiased
|
|
// pixels with the appropriate amount of the foreground
|
|
// color and the existing background color, and leaves
|
|
// other pixels alone.
|
|
//////////////////////////////////////////////////////////////////// 5 4 this 3 100 10 dest_image 1 103 2 xp 1 98 2 yp 1 98 2 fg 1 105
|
|
19 14 Dtool_g64kXZGO 0 4 23 97 0 14 Dtool_g64kXZGO 365 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::place
|
|
// Access: Public
|
|
// Description: This flavor of place() also fills in the interior
|
|
// color. This requires that determine_interior was
|
|
// called earlier.
|
|
//////////////////////////////////////////////////////////////////// 6 4 this 3 100 10 dest_image 1 103 2 xp 1 98 2 yp 1 98 2 fg 1 105 8 interior 1 105
|
|
20 14 Dtool_g64kNN7S 0 6 24 98 0 14 Dtool_g64kNN7S 296 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_left
|
|
// Access: Public
|
|
// Description: Returns the x coordinate of the leftmost pixel in the
|
|
// glyph.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 101
|
|
21 14 Dtool_g64kOTta 0 6 25 98 0 14 Dtool_g64kOTta 298 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_right
|
|
// Access: Public
|
|
// Description: Returns the x coordinate of the rightmost pixel in the
|
|
// glyph.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 101
|
|
22 14 Dtool_g64kebU7 0 6 26 98 0 14 Dtool_g64kebU7 300 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_bottom
|
|
// Access: Public
|
|
// Description: Returns the y coordinate of the bottommost pixel in
|
|
// the glyph.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 101
|
|
23 14 Dtool_g64kY8fj 0 6 27 98 0 14 Dtool_g64kY8fj 294 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_top
|
|
// Access: Public
|
|
// Description: Returns the y coordinate of the topmost pixel in the
|
|
// glyph.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 101
|
|
24 14 Dtool_g64kTe45 0 6 28 98 0 14 Dtool_g64kTe45 263 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_height
|
|
// Access: Public
|
|
// Description: Returns the height of the glyph in pixels.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 101
|
|
25 14 Dtool_g64kgCtM 0 6 29 98 0 14 Dtool_g64kgCtM 261 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_width
|
|
// Access: Public
|
|
// Description: Returns the width of the glyph in pixels.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 101
|
|
26 14 Dtool_g64kXUpe 0 6 30 99 0 14 Dtool_g64kXUpe 512 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_value
|
|
// Access: Public
|
|
// Description: Returns the value of the indicated pixel of the
|
|
// glyph. The result is in the range [0, 1], where 0
|
|
// indicates the pixel is not part of the glyph, and 1
|
|
// indicates it is. Intermediate values are used to
|
|
// represent antialiasing.
|
|
//////////////////////////////////////////////////////////////////// 3 4 this 3 101 1 x 1 98 1 y 1 98
|
|
27 14 Dtool_g64klSd8 0 6 31 94 0 14 Dtool_g64klSd8 367 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextGlyph::get_interior_flag
|
|
// Access: Public
|
|
// Description: Returns true if the indicated pixel represents a
|
|
// pixel in the interior of a hollow font, false
|
|
// otherwise.
|
|
//////////////////////////////////////////////////////////////////// 3 4 this 3 101 1 x 1 98 1 y 1 98
|
|
28 14 Dtool_g64kSyOX 0 7 33 111 74 14 Dtool_g64kSyOX 429 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::Constructor
|
|
// Access: Public
|
|
// Description: The constructor expects the name of some font file
|
|
// that FreeType can read, along with face_index,
|
|
// indicating which font within the file to load
|
|
// (usually 0).
|
|
//////////////////////////////////////////////////////////////////// 2 13 font_filename 1 108 10 face_index 1 98
|
|
29 14 Dtool_g64kd29m 0 7 33 111 74 14 Dtool_g64kd29m 227 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::Copy Constructor
|
|
// Access: Public
|
|
// Description:
|
|
//////////////////////////////////////////////////////////////////// 1 4 copy 1 112
|
|
30 14 Dtool_g64kG17a 0 7 33 111 74 14 Dtool_g64kG17a 370 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::Constructor
|
|
// Access: Public
|
|
// Description: This constructor works as above, but it takes the
|
|
// font data from an in-memory buffer instead of from a
|
|
// named file.
|
|
//////////////////////////////////////////////////////////////////// 3 9 font_data 1 114 11 data_length 1 98 10 face_index 1 98
|
|
31 14 Dtool_g64k6__N 0 6 36 94 0 14 Dtool_g64k6__N 810 // Filename: pnmTextMaker.I
|
|
// Created by: drose (07Sep03)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// PANDA 3D SOFTWARE
|
|
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
|
//
|
|
// All use of this software is subject to the terms of the revised BSD
|
|
// license. You should have received a copy of this license along
|
|
// with this source code in a file named "LICENSE."
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::is_valid
|
|
// Access: Public
|
|
// Description: Returns true if the PNMTextMaker is valid and ready to
|
|
// generate text, false otherwise.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 112
|
|
32 14 Dtool_g64kdlef 0 4 37 97 0 14 Dtool_g64kdlef 222 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::set_align
|
|
// Access: Published
|
|
// Description:
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 111 10 align_type 1 91
|
|
33 14 Dtool_g64kdekm 0 6 38 91 0 14 Dtool_g64kdekm 222 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_align
|
|
// Access: Published
|
|
// Description:
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 112
|
|
34 14 Dtool_g64knznD 0 4 39 97 0 14 Dtool_g64knznD 785 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::set_interior_flag
|
|
// Access: Published
|
|
// Description: Sets the flag that indicates whether the interior of
|
|
// hollow fonts is identified as a preprocess as each
|
|
// glyph is loaded. If this flag is true, you may
|
|
// specify an interior color along with a fg and bg
|
|
// color when you place text; if the flag is false, the
|
|
// interior color is ignored.
|
|
//
|
|
// It is generally best to set_native_antialias(0) when
|
|
// using this feature. Also, this works best when the
|
|
// pixel size is not very small.
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 111 13 interior_flag 1 94
|
|
35 14 Dtool_g64kstpe 0 6 40 94 0 14 Dtool_g64kstpe 230 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_interior_flag
|
|
// Access: Published
|
|
// Description:
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 112
|
|
36 14 Dtool_g64kYtt9 0 4 41 97 0 14 Dtool_g64kYtt9 436 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::set_fg
|
|
// Access: Published
|
|
// Description: Sets the foreground color of text that will be
|
|
// generated by future calls to generate_into(). This
|
|
// is the color that all of the "on" pixels in the font
|
|
// will show as.
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 111 2 fg 1 105
|
|
37 14 Dtool_g64k4B6D 0 6 42 105 0 14 Dtool_g64k4B6D 332 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_fg
|
|
// Access: Published
|
|
// Description: Returns the foreground color of text that will be
|
|
// generated by future calls to generate_into().
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 112
|
|
38 14 Dtool_g64kkBhG 0 4 43 97 0 14 Dtool_g64kkBhG 443 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::set_interior
|
|
// Access: Published
|
|
// Description: Sets the color that will be used to render the
|
|
// interior portions of hollow fonts in future calls to
|
|
// generate_into(). This is respected only if
|
|
// interior_flag is true.
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 111 8 interior 1 105
|
|
39 14 Dtool_g64kAU9W 0 6 44 105 0 14 Dtool_g64kAU9W 327 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_interior
|
|
// Access: Published
|
|
// Description: Returns the color that will be used to render the
|
|
// interior portions of hollow fonts.
|
|
//////////////////////////////////////////////////////////////////// 1 4 this 3 112
|
|
40 14 Dtool_g64kJGVO 0 6 45 98 0 14 Dtool_g64kJGVO 388 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::generate_into
|
|
// Access: Public
|
|
// Description: Generates a single line of text into the indicated
|
|
// image at the indicated position; the return value is
|
|
// the total width in pixels.
|
|
//////////////////////////////////////////////////////////////////// 5 4 this 3 111 4 text 1 114 10 dest_image 1 103 1 x 1 98 1 y 1 98
|
|
41 14 Dtool_g64kAbIL 0 6 45 98 0 14 Dtool_g64kAbIL 388 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::generate_into
|
|
// Access: Public
|
|
// Description: Generates a single line of text into the indicated
|
|
// image at the indicated position; the return value is
|
|
// the total width in pixels.
|
|
//////////////////////////////////////////////////////////////////// 5 4 this 3 111 4 text 1 114 10 dest_image 1 103 1 x 1 98 1 y 1 98
|
|
42 14 Dtool_g64kq0xt 0 6 46 98 0 14 Dtool_g64kq0xt 296 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::calc_width
|
|
// Access: Public
|
|
// Description: Returns the width in pixels of the indicated line of
|
|
// text.
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 111 4 text 1 114
|
|
43 14 Dtool_g64ky83A 0 6 46 98 0 14 Dtool_g64ky83A 296 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::calc_width
|
|
// Access: Public
|
|
// Description: Returns the width in pixels of the indicated line of
|
|
// text.
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 111 4 text 1 114
|
|
44 14 Dtool_g64kvFKg 0 6 47 100 0 14 Dtool_g64kvFKg 321 ////////////////////////////////////////////////////////////////////
|
|
// Function: PNMTextMaker::get_glyph
|
|
// Access: Public
|
|
// Description: Returns the glyph for the indicated index, or NULL if
|
|
// it is not defined in the font.
|
|
//////////////////////////////////////////////////////////////////// 2 4 this 3 111 9 character 1 98
|
|
30
|
|
87 12 FreetypeFont 0 26625 12 FreetypeFont 12 FreetypeFont 0 0 0 0 45 0 15 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 0 0 1 0 88 0 0 0 0 481
|
|
////////////////////////////////////////////////////////////////////
|
|
// Class : FreetypeFont
|
|
// Description : This is a common base class for both DynamicTextFont
|
|
// and PNMTextMaker. Both of these are utility classes
|
|
// that use the FreeType library to generate glyphs from
|
|
// fonts; this class abstracts out that common wrapper
|
|
// around FreeType.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
88 7 Namable 0 2049 7 Namable 7 Namable 0 0 0 0 0 0 0 0 0 0 0 0 324
|
|
////////////////////////////////////////////////////////////////////
|
|
// Class : Namable
|
|
// Description : A base class for all things which can have a name.
|
|
// The name is either empty or nonempty, but it is never
|
|
// NULL.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
89 12 PNMTextGlyph 0 26625 12 PNMTextGlyph 12 PNMTextGlyph 0 0 0 1 61 62 0 10 63 64 65 66 67 68 69 70 71 72 0 0 0 0 0 218
|
|
////////////////////////////////////////////////////////////////////
|
|
// Class : PNMTextGlyph
|
|
// Description : A single glyph in a PNMTextMaker.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
90 12 PNMTextMaker 0 26625 12 PNMTextMaker 12 PNMTextMaker 0 0 0 1 73 74 0 12 75 76 77 78 79 80 81 82 83 84 85 86 0 0 1 0 87 0 0 0 1 91 534
|
|
////////////////////////////////////////////////////////////////////
|
|
// Class : PNMTextMaker
|
|
// Description : This object uses the Freetype library to generate
|
|
// text directly into an image. It is different from
|
|
// the TextNode/DynamicTextFont interface, which use the
|
|
// Freetype library to generate text in the scene graph,
|
|
// to be rendered onscreen via the Panda render
|
|
// traversal.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
91 9 Alignment 0 794624 23 PNMTextMaker::Alignment 23 PNMTextMaker::Alignment 90 0 0 0 0 0 0 0 0 0 3 6 A_left 20 PNMTextMaker::A_left 0 7 A_right 21 PNMTextMaker::A_right 1 8 A_center 22 PNMTextMaker::A_center 2 0 0
|
|
|
|
92 14 FreetypeFont * 0 8576 14 FreetypeFont * 14 FreetypeFont * 0 0 87 0 0 0 0 0 0 0 0 0 0
|
|
|
|
93 5 float 0 8194 5 float 5 float 0 2 0 0 0 0 0 0 0 0 0 0 0
|
|
|
|
94 4 bool 0 8194 4 bool 4 bool 0 4 0 0 0 0 0 0 0 0 0 0 0
|
|
|
|
95 20 FreetypeFont const * 0 8576 20 FreetypeFont const * 20 FreetypeFont const * 0 0 96 0 0 0 0 0 0 0 0 0 0
|
|
|
|
96 18 FreetypeFont const 0 8832 18 FreetypeFont const 18 FreetypeFont const 0 0 87 0 0 0 0 0 0 0 0 0 0
|
|
|
|
97 4 void 0 8194 4 void 4 void 0 6 0 0 0 0 0 0 0 0 0 0 0
|
|
|
|
98 3 int 0 8194 3 int 3 int 0 1 0 0 0 0 0 0 0 0 0 0 0
|
|
|
|
99 6 double 0 8194 6 double 6 double 0 3 0 0 0 0 0 0 0 0 0 0 0
|
|
|
|
100 14 PNMTextGlyph * 0 8576 14 PNMTextGlyph * 14 PNMTextGlyph * 0 0 89 0 0 0 0 0 0 0 0 0 0
|
|
|
|
101 20 PNMTextGlyph const * 0 8576 20 PNMTextGlyph const * 20 PNMTextGlyph const * 0 0 102 0 0 0 0 0 0 0 0 0 0
|
|
|
|
102 18 PNMTextGlyph const 0 8832 18 PNMTextGlyph const 18 PNMTextGlyph const 0 0 89 0 0 0 0 0 0 0 0 0 0
|
|
|
|
103 10 PNMImage * 0 8576 10 PNMImage * 10 PNMImage * 0 0 104 0 0 0 0 0 0 0 0 0 0
|
|
|
|
104 8 PNMImage 0 2048 8 PNMImage 8 PNMImage 0 0 0 0 0 0 0 0 0 0 0 0 1506
|
|
////////////////////////////////////////////////////////////////////
|
|
// Class : PNMImage
|
|
// Description : The name of this class derives from the fact that we
|
|
// originally implemented it as a layer on top of the
|
|
// "pnm library", based on netpbm, which was built to
|
|
// implement pbm, pgm, and pbm files, and is the
|
|
// underlying support of a number of public-domain image
|
|
// file converters. Nowadays we are no longer derived
|
|
// directly from the pnm library, mainly to allow
|
|
// support of C++ iostreams instead of the C stdio FILE
|
|
// interface.
|
|
//
|
|
// Conceptually, a PNMImage is a two-dimensional array
|
|
// of xels, which are the PNM-defined generic pixel
|
|
// type. Each xel may have a red, green, and blue
|
|
// component, or (if the image is grayscale) a gray
|
|
// component. The image may be read in, the individual
|
|
// xels manipulated, and written out again, or a black
|
|
// image may be constructed from scratch.
|
|
//
|
|
// The image is of size XSize() by YSize() xels,
|
|
// numbered from top to bottom, left to right, beginning
|
|
// at zero.
|
|
//
|
|
// Files can be specified by filename, or by an iostream
|
|
// pointer. The filename "-" refers to stdin or stdout.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
105 18 LVecBase4f const * 0 8576 18 LVecBase4f const * 18 LVecBase4f const * 0 0 106 0 0 0 0 0 0 0 0 0 0
|
|
|
|
106 16 LVecBase4f const 0 8832 16 LVecBase4f const 16 LVecBase4f const 0 0 107 0 0 0 0 0 0 0 0 0 0
|
|
|
|
107 10 LVecBase4f 0 2048 10 LVecBase4f 10 LVecBase4f 0 0 0 0 0 0 0 0 0 0 0 0 265
|
|
////////////////////////////////////////////////////////////////////
|
|
// Class : LVecBase4
|
|
// Description : This is the base class for all three-component
|
|
// vectors and points.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
108 16 Filename const * 0 8576 16 Filename const * 16 Filename const * 0 0 109 0 0 0 0 0 0 0 0 0 0
|
|
|
|
109 14 Filename const 0 8832 14 Filename const 14 Filename const 0 0 110 0 0 0 0 0 0 0 0 0 0
|
|
|
|
110 8 Filename 0 2048 8 Filename 8 Filename 0 0 0 0 0 0 0 0 0 0 0 0 869
|
|
////////////////////////////////////////////////////////////////////
|
|
// Class : Filename
|
|
// Description : The name of a file, such as a texture file or an Egg
|
|
// file. Stores the full pathname, and includes
|
|
// functions for extracting out the directory prefix
|
|
// part and the file extension and stuff.
|
|
//
|
|
// A Filename is also aware of the mapping between the
|
|
// Unix-like filename convention we use internally, and
|
|
// the local OS's specific filename convention, and it
|
|
// knows how to perform basic OS-specific I/O, like
|
|
// testing for file existence and searching a
|
|
// searchpath, as well as the best way to open an
|
|
// fstream for reading or writing.
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
111 14 PNMTextMaker * 0 8576 14 PNMTextMaker * 14 PNMTextMaker * 0 0 90 0 0 0 0 0 0 0 0 0 0
|
|
|
|
112 20 PNMTextMaker const * 0 8576 20 PNMTextMaker const * 20 PNMTextMaker const * 0 0 113 0 0 0 0 0 0 0 0 0 0
|
|
|
|
113 18 PNMTextMaker const 0 8832 18 PNMTextMaker const 18 PNMTextMaker const 0 0 90 0 0 0 0 0 0 0 0 0 0
|
|
|
|
114 13 atomic string 0 2 13 atomic string 13 atomic string 0 7 0 0 0 0 0 0 0 0 0 0 0
|
|
|
|
115 7 wstring 0 2048 23 basic_string< wchar_t > 23 basic_string< wchar_t > 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
|
|
116 6 string 0 2048 20 basic_string< char > 20 basic_string< char > 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
|
|
0
|
|
0
|
|
0
|