Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

FontSDL.h 772B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*!
  2. * \file include/FontSDL.h
  3. * \brief SDL windowing implementation
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _FONT_SDL_H_
  8. #define _FONT_SDL_H_
  9. #include "SDL_ttf.h"
  10. #include "Font.h"
  11. /*!
  12. * \brief SDL windowing implementation
  13. */
  14. class FontSDL : public Font {
  15. public:
  16. /*!
  17. * \brief Constructs an object of FontSDL
  18. */
  19. FontSDL();
  20. /*!
  21. * \brief Deconstructs an object of FontSDL
  22. */
  23. virtual ~FontSDL();
  24. virtual int initialize();
  25. virtual void writeString(FontString &s);
  26. virtual void drawText(unsigned int x, unsigned int y, float scale, const float color[4], const char *s, ...)
  27. __attribute__((format(printf, 6, 0)));
  28. private:
  29. TTF_Font *mFont;
  30. unsigned int mFontTexture;
  31. FontString tempText;
  32. };
  33. #endif