Changeset 8316 in orxonox.OLD for trunk/src/lib/graphics/text_engine
- Timestamp:
- Jun 11, 2006, 1:57:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/font.cc
r7727 r8316 220 220 221 221 /** 222 * sets a specific renderStyle222 * @brief sets a specific renderStyle 223 223 * @param renderStyle the Style to render: a string (char-array) containing: 224 224 * i: italic, b: bold, u, underline … … 228 228 this->renderStyle = TTF_STYLE_NORMAL; 229 229 230 for ( int i = 0; i < renderStyle.size(); i++)230 for (unsigned int i = 0; i < renderStyle.size(); i++) 231 231 { 232 232 if (renderStyle[i] == 'b') … … 246 246 247 247 /** 248 * creates and exports an Image, that has all the characters248 * @brief creates and exports an Image, that has all the characters 249 249 * stored in a Array (as an image) 250 250 * @param fileName the File to write the image into. … … 257 257 258 258 // 259 SDL_Color tmpColor = {0, 0, 0};260 259 // Surface definition. 261 260 SDL_Rect tmpRect; // this represents a Rectangle for blitting. … … 277 276 tmpRect.x = 0; tmpRect.y = 0; tmpRect.w = tmpSurf->w; tmpRect.h = tmpSurf->h; 278 277 SDL_SetClipRect(tmpSurf, &tmpRect); 279 int maxLineHeight = 0;280 278 281 279 int posX, posY; … … 339 337 /** 340 338 * @returns the maximum ascent of the Font, if the font was initialized, 0 otherwise 341 342 339 * 340 * the ascent is the pixels of the font above the baseline 343 341 */ 344 342 int Font::getMaxAscent() const … … 352 350 /** 353 351 * @returns the maximum descent of the Font, if the font was initialized, 0 otherwise 354 355 352 * 353 * the descent is the pixels of the font below the baseline 356 354 */ 357 355 int Font::getMaxDescent() const … … 404 402 405 403 /** 406 * creates a Fast-Texture of this Font404 * @brief creates a Fast-Texture of this Font 407 405 */ 408 406 bool Font::createFastTexture() … … 497 495 if (this->setSurface(tmpSurf)) 498 496 (this->setTexture(Texture::loadTexToGL(tmpSurf))); 497 return true; 499 498 } 500 499 … … 547 546 return 0; 548 547 549 int i;550 int x,y; // the counters548 unsigned int i; 549 unsigned int x,y; // the counters 551 550 int maxLineHeight = this->getMaxHeight(); 552 551 unsigned int size = 32; // starting Value, we have to start somewhere 32 seems reasonable. (take any small enough 2^i number) … … 587 586 588 587 /** 589 * a simple function to get some interesting information about this class588 * @brief a simple function to get some interesting information about this class 590 589 */ 591 590 void Font::debug() 592 591 { 593 592 // print the loaded font's style 594 int style ;593 int style = TTF_STYLE_NORMAL; 595 594 if (likely(this->fontTTF != NULL)) 596 595 style = TTF_GetFontStyle(this->fontTTF);
Note: See TracChangeset
for help on using the changeset viewer.