• 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 <Gosu/Platform.hpp>
00011 #include <boost/scoped_ptr.hpp>
00012 #include <string>
00013 
00014 namespace Gosu
00015 {
00020     class Font
00021     {
00022         struct Impl;
00023         boost::scoped_ptr<Impl> pimpl;
00024 
00025     public:
00032         Font(Graphics& graphics, const std::wstring& fontName,
00033             unsigned fontHeight, unsigned fontFlags = ffBold);
00034         ~Font();
00035         
00037         std::wstring name() const;
00038         
00040         unsigned height() const;
00041         
00043         unsigned flags() const;
00044         
00046         double textWidth(const std::wstring& text, double factorX = 1) const;
00047         
00050         void draw(const std::wstring& text, double x, double y, ZPos z,
00051             double factorX = 1, double factorY = 1,
00052             Color c = Color::WHITE, AlphaMode mode = amDefault) const;
00053         
00060         void drawRel(const std::wstring& text, double x, double y, ZPos z,
00061             double relX, double relY, double factorX = 1, double factorY = 1,
00062             Color c = Color::WHITE, AlphaMode mode = amDefault) const;
00063         
00064         #ifndef SWIG
00065         GOSU_DEPRECATED
00066         #endif
00069         void drawRot(const std::wstring& text, double x, double y, ZPos z, double angle,
00070             double factorX = 1, double factorY = 1,
00071             Color c = Color::WHITE, AlphaMode mode = amDefault) const;
00072     };
00073 }
00074 
00075 #endif

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