Equalizer  1.6.1
bitmapFont.h
1 
2 /* Copyright (c) 2008-2011, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef EQUTIL_BITMAPFONT_H
19 #define EQUTIL_BITMAPFONT_H
20 
21 #include <eq/util/types.h>
22 #include <eq/client/api.h>
23 #include <eq/client/windowSystem.h> // enum used
24 #include <lunchbox/types.h>
25 
26 #include <string>
27 
28 namespace eq
29 {
30 namespace util
31 {
33  template< class OMT > class BitmapFont
34  {
35  public:
48  EQ_API BitmapFont( ObjectManager< OMT >& gl, const OMT& key );
49 
57  EQ_API ~BitmapFont();
58 
74  EQ_API bool init( const WindowSystem ws, const std::string& name,
75  const uint32_t size = 12 );
76 
78  EQ_API void exit();
79 
84  EQ_API void draw( const std::string& text ) const;
85 
86  private:
88  const OMT _key;
89  };
90 }
91 }
92 #endif // EQUTIL_BITMAPFONT_H
~BitmapFont()
Destruct this bitmap font.
util::BitmapFont< const void * > BitmapFont
The bitmap font used in the client library.
BitmapFont(ObjectManager< OMT > &gl, const OMT &key)
Construct a new bitmap font.
bool init(const WindowSystem ws, const std::string &name, const uint32_t size=12)
Initialize this bitmap font.
void draw(const std::string &text) const
Draw text on the current raster position.
void exit()
De-initialize this bitmap font.