Panda3D
|
00001 // Filename: textFont.I 00002 // Created by: drose (08Feb02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: TextFont::is_valid 00018 // Access: Published 00019 // Description: Returns true if the font is valid and ready to use, 00020 // false otherwise. 00021 //////////////////////////////////////////////////////////////////// 00022 INLINE bool TextFont:: 00023 is_valid() const { 00024 return _is_valid; 00025 } 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: TextFont::operator bool 00029 // Access: Published 00030 // Description: Returns true if the font is valid and ready to use, 00031 // false otherwise. 00032 //////////////////////////////////////////////////////////////////// 00033 INLINE TextFont:: 00034 operator bool () const { 00035 return is_valid(); 00036 } 00037 00038 //////////////////////////////////////////////////////////////////// 00039 // Function: TextFont::get_line_height 00040 // Access: Published 00041 // Description: Returns the number of units high each line of text 00042 // is. 00043 //////////////////////////////////////////////////////////////////// 00044 INLINE PN_stdfloat TextFont:: 00045 get_line_height() const { 00046 return _line_height; 00047 } 00048 00049 //////////////////////////////////////////////////////////////////// 00050 // Function: TextFont::set_line_height 00051 // Access: Published 00052 // Description: Changes the number of units high each line of text 00053 // is. 00054 //////////////////////////////////////////////////////////////////// 00055 INLINE void TextFont:: 00056 set_line_height(PN_stdfloat line_height) { 00057 _line_height = line_height; 00058 } 00059 00060 //////////////////////////////////////////////////////////////////// 00061 // Function: TextFont::get_space_advance 00062 // Access: Published 00063 // Description: Returns the number of units wide a space is. 00064 //////////////////////////////////////////////////////////////////// 00065 INLINE PN_stdfloat TextFont:: 00066 get_space_advance() const { 00067 return _space_advance; 00068 } 00069 00070 //////////////////////////////////////////////////////////////////// 00071 // Function: TextFont::set_space_advance 00072 // Access: Published 00073 // Description: Changes the number of units wide a space is. 00074 //////////////////////////////////////////////////////////////////// 00075 INLINE void TextFont:: 00076 set_space_advance(PN_stdfloat space_advance) { 00077 _space_advance = space_advance; 00078 }