- Timestamp:
- Oct 21, 2005, 1:13:58 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.cc
r5417 r5418 939 939 glRotatef(this->getAbsDir2D(), 0,0,1); 940 940 glBegin(GL_LINE_LOOP); 941 glVertex2f( -this->getSizeX2D(), -this->getSizeY2D());942 glVertex2f( -this->getSizeX2D(), +this->getSizeY2D());941 glVertex2f(0, 0); 942 glVertex2f(0, +this->getSizeY2D()); 943 943 glVertex2f(+this->getSizeX2D(), +this->getSizeY2D()); 944 glVertex2f(+this->getSizeX2D(), -this->getSizeY2D());944 glVertex2f(+this->getSizeX2D(), 0); 945 945 glEnd(); 946 946 -
trunk/src/lib/graphics/text_engine/font.cc
r5370 r5418 215 215 tmpGlyph->texCoord[3] = cy+0.0625f; 216 216 tmpGlyph->width = 1; 217 tmpGlyph->advance = 1; 217 218 tmpGlyph->bearingX = 1; 218 219 tmpGlyph->bearingY = 1; -
trunk/src/lib/graphics/text_engine/text.cc
r5376 r5418 39 39 this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE); 40 40 this->setType(type); 41 this->s ize = textSize;41 this->setSizeY2D(this->size = textSize); 42 42 } 43 43 … … 147 147 148 148 // setting up the Text-Width if DYNAMIC 149 if (this->type & TEXT_RENDER_DYNAMIC && this->getAlignment() != TEXT_ALIGN_LEFT && this->font != NULL) 150 { 151 Glyph** glyphArray = this->font->getGlyphArray(); 149 // if (this->type & TEXT_RENDER_DYNAMIC && this->getAlignment() != TEXT_ALIGN_LEFT && this->font != NULL) 150 const Font* calcSizeFont = this->font; 151 if (calcSizeFont != NULL || (calcSizeFont = Font::getDefaultFont()) != NULL) 152 { 153 Glyph** glyphArray = calcSizeFont->getGlyphArray(); 152 154 153 155 float width = 0; … … 159 161 while (*tmpText != '\0') 160 162 { 161 if(glyphArray[*tmpText] )163 if(glyphArray[*tmpText] != NULL) 162 164 { 163 width += glyphArray[*tmpText]-> width;165 width += glyphArray[*tmpText]->advance; 164 166 } 165 167 tmpText++; 166 168 } 167 this-> width = width;169 this->setSizeX2D(this->width = width *this->getSizeY2D()); 168 170 } 169 171 } -
trunk/src/lib/graphics/text_engine/text.h
r5395 r5418 69 69 void setColor(float r, float g, float b) { this->color = Vector(r, g, b); }; 70 70 /** sets the Size of the Font */ 71 void setSize(float size) { this->s ize = size; };71 void setSize(float size) { this->setSizeY2D(this->size = size); }; 72 72 /** @returns the Size of the Text */ 73 73 // void getSize(float &x, float& y) const { return this->size; }; -
trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc
r5399 r5418 54 54 { 55 55 this->label->draw(); 56 printf("test");56 // printf("test"); 57 57 } 58 58
Note: See TracChangeset
for help on using the changeset viewer.