Changeset 3774 in orxonox.OLD for orxonox/branches/textEngine/src/lib/graphics
- Timestamp:
- Apr 11, 2005, 2:27:17 PM (20 years ago)
- Location:
- orxonox/branches/textEngine/src/lib/graphics/font
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/textEngine/src/lib/graphics/font/text_engine.cc
r3773 r3774 149 149 \todo FIX this is to slow/static 150 150 */ 151 void Text::draw(void) 151 void Text::draw(void) const 152 152 { 153 153 // storing all the Transformation Matrices. … … 225 225 } 226 226 227 /** 228 \brief prints out some nice debug information about this text 229 */ 230 void Text::debug(void) const 231 { 232 PRINT(0)("=== TEXT: %s ===\n", this->text); 233 if (this->bindNode) 234 PRINT(0)("is bind to %s; ref=%p\n", this->bindNode->getName(), this->bindNode); 235 PRINT(0)("Relative Position: (%d::%d)\n", this->posSize.x, this->posSize.y); 236 PRINT(0)("Color: %d %d %d\n", this->color.r, this->color.g, this->color.b); 237 } 227 238 228 239 … … 621 632 // print the loaded font's style 622 633 int style; 623 style =TTF_GetFontStyle(this->font);634 style = TTF_GetFontStyle(this->font); 624 635 PRINTF(0)("The font style is:"); 625 636 if(style==TTF_STYLE_NORMAL) … … 854 865 855 866 /** 856 \brief d raws all the Texts that have been initialized857 */ 858 void TextEngine:: draw(void) const867 \brief deletes all the Text, and tries to delete all allocated fonts 868 */ 869 void TextEngine::flush(void) 859 870 { 860 871 tIterator<Text>* textIterator = textList->getIterator(); … … 862 873 while( text != NULL) 863 874 { 875 delete text; 876 text = textIterator->nextElement(); 877 } 878 delete textIterator; 879 } 880 881 /** 882 \brief draws all the Texts that have been initialized 883 */ 884 void TextEngine::draw(void) const 885 { 886 tIterator<Text>* textIterator = textList->getIterator(); 887 Text* text = textIterator->nextElement(); 888 while( text != NULL) 889 { 864 890 text->draw(); 865 891 text = textIterator->nextElement(); … … 867 893 delete textIterator; 868 894 } 895 896 /** 897 \brief outputs some nice Debug information 898 899 \todo there should also be something outputted about Font 900 */ 901 void TextEngine::debug(void) const 902 { 903 PRINT(0)("+-------------------------------+\n"); 904 PRINT(0)("+ TEXT ENGINE DEBUG INFORMATION +\n"); 905 PRINT(0)("+-------------------------------+\n"); 906 PRINT(0)("Reference: %p; Text Counts: %d\n", this, this->textList->getSize()); 907 908 tIterator<Text>* textIterator = textList->getIterator(); 909 Text* text = textIterator->nextElement(); 910 while( text != NULL) 911 { 912 text->debug(); 913 text = textIterator->nextElement(); 914 } 915 delete textIterator; 916 PRINT(0)("+---------------------------TE--+\n"); 917 } 918 869 919 870 920 /** -
orxonox/branches/textEngine/src/lib/graphics/font/text_engine.h
r3773 r3774 107 107 void createTexture(); 108 108 109 // Dynamic Text 110 111 112 113 virtual void draw(void); 109 void draw(void) const; 110 111 void debug(void) const; 114 112 115 113 private: … … 202 200 203 201 void deleteText(Text* text); 202 void flush(void); 204 203 205 204 void draw(void) const; 206 205 206 void debug(void) const; 207 207 208 private: 208 209 TextEngine(void);
Note: See TracChangeset
for help on using the changeset viewer.