Fix issue in Rocket.lua script.
[Cafu-Engine.git] / Libs / Fonts / Font.hpp
blob54dec2f6596ee7465bcd71e3b45b647082b0824c
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
7 #ifndef CAFU_MATSYS_FONT_HPP_INCLUDED
8 #define CAFU_MATSYS_FONT_HPP_INCLUDED
10 #include <string>
13 namespace MatSys { class RenderMaterialT; }
16 /// A class for MatSys-based font rendering.
17 /// The only requirement is that the MatSys in fully initialized (the global MatSys::Renderer pointer is set)
18 /// before any object of this class is instantiated.
19 class FontT
21 public:
23 /// The constructor.
24 FontT(const std::string& MaterialName);
26 /// The destructor.
27 ~FontT();
29 /// The copy constructor.
30 FontT(const FontT& Other);
32 /// The assignment operator.
33 FontT& operator = (const FontT& Other);
35 /// Prints PrintString at (PosX, PosY) in color Color.
36 void Print(int PosX, int PosY, float FrameWidth, float FrameHeight, unsigned long Color, const std::string& PrintString);
38 /// Accumulative printing functions. Faster if you have to call Print() a lot.
39 void AccPrintBegin(float FrameWidth, float FrameHeight);
40 void AccPrint(int PosX, int PosY, unsigned long Color, const std::string& PrintString);
41 void AccPrintEnd();
44 private:
46 MatSys::RenderMaterialT* RenderMaterial;
49 #endif