• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

Font.hpp

Go to the documentation of this file.
00001 
00002 
00003 
00004 #ifndef GOSU_FONT_HPP
00005 #define GOSU_FONT_HPP
00006 
00007 #include <Gosu/Fwd.hpp>
00008 #include <Gosu/Color.hpp>
00009 #include <Gosu/GraphicsBase.hpp>
00010 #include <boost/scoped_ptr.hpp>
00011 #include <string>
00012 
00013 namespace Gosu
00014 {
00019     class Font
00020     {
00021         struct Impl;
00022         boost::scoped_ptr<Impl> pimpl;
00023 
00024     public:
00031         Font(Graphics& graphics, const std::wstring& fontName,
00032             unsigned fontHeight, unsigned fontFlags = ffBold);
00033         ~Font();
00034         
00036         std::wstring name() const;
00037         
00039         unsigned height() const;
00040         
00042         unsigned flags() const;
00043         
00045         double textWidth(const std::wstring& text, double factorX = 1) const;
00046         
00048         void draw(const std::wstring& text, double x, double y, ZPos z,
00049             double factorX = 1, double factorY = 1,
00050             Color c = Colors::white, AlphaMode mode = amDefault) const;
00051         
00058         void drawRel(const std::wstring& text, double x, double y, ZPos z,
00059             double relX, double relY, double factorX = 1, double factorY = 1,
00060             Color c = Colors::white, AlphaMode mode = amDefault) const;
00061         
00063         void drawRot(const std::wstring& text, double x, double y, ZPos z, double angle,
00064             double factorX = 1, double factorY = 1,
00065             Color c = Colors::white, AlphaMode mode = amDefault) const;
00066     };
00067 }
00068 
00069 #endif

Documentation not clear enough? Please go to one of the places listed on http://www.libgosu.org/ and leave feedback. Thanks!