Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8766 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Jun 24, 2006, 3:54:58 AM (19 years ago)
Author:
bensch
Message:

font: no more friends

Location:
trunk/src/lib/graphics/text_engine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/text_engine/font.cc

    r8765 r8766  
    165165    this->data = Font::defaultFontData;
    166166
    167   this->setTexture(this->data->texData);
     167  this->setTexture(this->data->textureData());
    168168  return retVal;
    169169}
     
    180180    this->data = Font::defaultFontData;
    181181
    182   this->setTexture(this->data->texData);
     182  this->setTexture(this->data->textureData());
    183183  return retVal;
    184184}
     
    274274  Material::debug();
    275275
    276   PRINT(0)("TEST %p and %p\n", this->data.get(), this->data->texData.get());
     276  PRINT(0)("TEST %p and %p\n", this->data.get(), this->data->textureData().get());
    277277  // print the loaded font's style
    278278/*  int style = TTF_STYLE_NORMAL;
  • trunk/src/lib/graphics/text_engine/font.h

    r8765 r8766  
    1717
    1818//! A class to handle a Font of a certain ttf-File/image-file, Size.
    19 class Font : public Material /* TODO Material it should be */
     19class Font : public Material
    2020{
    2121
  • trunk/src/lib/graphics/text_engine/font_data.h

    r8765 r8766  
    5050class FontData
    5151{
    52   friend class Font;
    5352public:
     53  FontData();
    5454  ~FontData();
    55 
    5655
    5756  /// LOADING new Fonts
     
    6059
    6160  void setStyle(TTF_Font* font, const std::string& renderStyle);
    62 
    63 
    6461
    6562  /** @returns a Pointer to the Array of Glyphs */
     
    7067  int getMaxDescent() const { return maxDescent; };
    7168
     69  /** @returns the Texture-Data of this FontData */
     70  const TextureDataPointer& textureData() const { return texData; };
    7271
    7372  bool rebuild();
    7473
    75 
    76 
    77 
    78 
    7974private:
    80   FontData();
    8175
    8276  void initGlyphs(TTF_Font* font, Uint16 from, Uint16 count);
     
    8680  bool createFastTexture(TTF_Font* font);
    8781
     82
    8883private:
    8984  std::string   fontFile;            //!< The FileName the Font was loaded from.
    90 
    9185  int           renderStyle;         //!< The Renderstyle
    9286  unsigned int  renderSize;          //!< How big the Font should be rendered.
Note: See TracChangeset for help on using the changeset viewer.