Text.hpp
Go to the documentation of this file.
1 
2 
3 
4 #ifndef GOSU_TEXT_HPP
5 #define GOSU_TEXT_HPP
6 
7 #include <Gosu/Fwd.hpp>
8 #include <Gosu/Color.hpp>
9 #include <Gosu/GraphicsBase.hpp>
10 #include <string>
11 
12 namespace Gosu
13 {
16  std::wstring defaultFontName();
17 
23  unsigned textWidth(const std::wstring& text,
24  const std::wstring& fontName, unsigned fontHeight,
25  unsigned fontFlags = 0);
26 
34  void drawText(Bitmap& bitmap, const std::wstring& text, int x, int y,
35  Color c, const std::wstring& fontName, unsigned fontHeight,
36  unsigned fontFlags = 0);
37 
45  Bitmap createText(const std::wstring& text,
46  const std::wstring& fontName, unsigned fontHeight,
47  unsigned fontFlags = 0);
48 
61  Bitmap createText(const std::wstring& text,
62  const std::wstring& fontName, unsigned fontHeight,
63  int lineSpacing, unsigned width, TextAlign align,
64  unsigned fontFlags = 0);
65 
68  void registerEntity(const std::wstring& name, const Bitmap& replacement);
69 }
70 
71 #endif