mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
extend public interfaces
This commit is contained in:
parent
a4bf09d581
commit
80d45b4eb2
@ -36,7 +36,7 @@ ConfigureFn(config_text) {
|
||||
const bool text_flatten = config_text.GetBool("text-flatten", true);
|
||||
const bool text_update_cleared_glyphs = config_text.GetBool("text-update-cleared-glyphs", false);
|
||||
const int text_anisotropic_degree = config_text.GetInt("text-anisotropic-degree", 1);
|
||||
const int text_texture_margin = config_text.GetInt("text-texture-margin", 2);
|
||||
const int text_texture_margin = config_text.GetInt("text-texture-margin", 3);
|
||||
const float text_poly_margin = config_text.GetFloat("text-poly-margin", 1.0f);
|
||||
const int text_page_x_size = config_text.GetInt("text-page-x-size", 256);
|
||||
const int text_page_y_size = config_text.GetInt("text-page-y-size", 256);
|
||||
|
@ -39,12 +39,33 @@ get_line_height() const {
|
||||
return _line_height;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TextFont::set_line_height
|
||||
// Access: Published
|
||||
// Description: Changes the number of units high each line of text
|
||||
// is.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void TextFont::
|
||||
set_line_height(float line_height) {
|
||||
_line_height = line_height;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TextFont::get_space_advance
|
||||
// Access: Public
|
||||
// Access: Published
|
||||
// Description: Returns the number of units wide a space is.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float TextFont::
|
||||
get_space_advance() const {
|
||||
return _space_advance;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TextFont::set_space_advance
|
||||
// Access: Published
|
||||
// Description: Changes the number of units wide a space is.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void TextFont::
|
||||
set_space_advance(float space_advance) {
|
||||
_space_advance = space_advance;
|
||||
}
|
||||
|
@ -53,6 +53,10 @@ PUBLISHED:
|
||||
|
||||
INLINE bool is_valid() const;
|
||||
INLINE float get_line_height() const;
|
||||
INLINE void set_line_height(float line_height);
|
||||
|
||||
INLINE float get_space_advance() const;
|
||||
INLINE void set_space_advance(float space_advance);
|
||||
|
||||
float calc_width(int character);
|
||||
float calc_width(const string &line);
|
||||
@ -66,7 +70,6 @@ public:
|
||||
wstring wordwrap_to(const wstring &text, float wordwrap_width,
|
||||
bool preserve_trailing_whitespace);
|
||||
|
||||
INLINE float get_space_advance() const;
|
||||
virtual bool get_glyph(int character, const TextGlyph *&glyph,
|
||||
float &glyph_scale)=0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user