diff options
author | fluxgen <fluxgen> | 2002-12-08 18:37:08 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-12-08 18:37:08 (GMT) |
commit | 216da58a08a2b5645725448843f26c9e52c1b3df (patch) | |
tree | 605ee2066d010300f97824f42bc189f35211a3fb | |
parent | b31ddf76afe30f76feb2c2648f280a23d6da07ac (diff) | |
download | fluxbox_paul-216da58a08a2b5645725448843f26c9e52c1b3df.zip fluxbox_paul-216da58a08a2b5645725448843f26c9e52c1b3df.tar.bz2 |
comments and bool rotate argument for drawText
-rw-r--r-- | src/FbTk/Font.hh | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/src/FbTk/Font.hh b/src/FbTk/Font.hh index 0e88e69..a120539 100644 --- a/src/FbTk/Font.hh +++ b/src/FbTk/Font.hh | |||
@@ -1,5 +1,5 @@ | |||
1 | // Font.cc | 1 | // Font.cc for FbTk |
2 | // Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org) | 2 | // Copyright (c) 2002 Henrik Kinnunen (fluxgen at linuxmail.org) |
3 | // | 3 | // |
4 | // Permission is hereby granted, free of charge, to any person obtaining a | 4 | // Permission is hereby granted, free of charge, to any person obtaining a |
5 | // copy of this software and associated documentation files (the "Software"), | 5 | // copy of this software and associated documentation files (the "Software"), |
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | //$Id: Font.hh,v 1.2 2002/12/01 13:42:14 rathnor Exp $ | 22 | //$Id: Font.hh,v 1.3 2002/12/08 18:37:08 fluxgen Exp $ |
23 | 23 | ||
24 | #ifndef FBTK_FONT_HH | 24 | #ifndef FBTK_FONT_HH |
25 | #define FBTK_FONT_HH | 25 | #define FBTK_FONT_HH |
@@ -39,6 +39,7 @@ class FontImp; | |||
39 | */ | 39 | */ |
40 | class Font { | 40 | class Font { |
41 | public: | 41 | public: |
42 | |||
42 | Font(const char *name=0, bool antialias = false); | 43 | Font(const char *name=0, bool antialias = false); |
43 | virtual ~Font(); | 44 | virtual ~Font(); |
44 | /** | 45 | /** |
@@ -66,17 +67,33 @@ public: | |||
66 | Rotate font in any angle (currently only 90 degrees supported and just XFont implementation) | 67 | Rotate font in any angle (currently only 90 degrees supported and just XFont implementation) |
67 | */ | 68 | */ |
68 | void rotate(float angle); | 69 | void rotate(float angle); |
69 | void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const; | 70 | |
70 | bool isAntialias() const { return m_antialias; } | 71 | /** |
72 | Draws text to drawable | ||
73 | @param w the drawable | ||
74 | @param screen screen number | ||
75 | @param gc Graphic Context | ||
76 | @param text the text buffer | ||
77 | @param len size of text buffer | ||
78 | @param x position | ||
79 | @param y position | ||
80 | @param rotate if the text should be drawn rotated (if it's rotated before) | ||
81 | */ | ||
82 | void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y, bool rotate=true) const; | ||
83 | bool isAntialias() const { return m_antialias; } | ||
84 | /// @return true if the font is rotated, else false | ||
71 | bool isRotated() const { return m_rotated; } | 85 | bool isRotated() const { return m_rotated; } |
86 | /// @return rotated angle | ||
87 | float angle() const { return m_angle; } | ||
72 | private: | 88 | private: |
73 | 89 | ||
74 | std::auto_ptr<FontImp> m_fontimp; | 90 | std::auto_ptr<FontImp> m_fontimp; ///< font implementation |
75 | std::string m_fontstr; | 91 | std::string m_fontstr; ///< font name |
76 | static bool m_multibyte; | 92 | static bool m_multibyte; ///< if the fontimp should be a multibyte font |
77 | static bool m_utf8mode; | 93 | static bool m_utf8mode; ///< should the font use utf8 font imp |
78 | bool m_antialias; | 94 | bool m_antialias; ///< is font antialias |
79 | bool m_rotated; ///< wheter we're rotated or not | 95 | bool m_rotated; ///< wheter we're rotated or not |
96 | float m_angle; ///< rotation angle | ||
80 | }; | 97 | }; |
81 | 98 | ||
82 | }; //end namespace FbTk | 99 | }; //end namespace FbTk |