aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Font.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Font.hh')
-rw-r--r--src/FbTk/Font.hh19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/FbTk/Font.hh b/src/FbTk/Font.hh
index 76fe63a..720a01e 100644
--- a/src/FbTk/Font.hh
+++ b/src/FbTk/Font.hh
@@ -38,6 +38,7 @@
38#endif // HAVE_ICONV 38#endif // HAVE_ICONV
39 39
40#include "Color.hh" 40#include "Color.hh"
41#include "Text.hh"
41 42
42namespace FbTk { 43namespace FbTk {
43 44
@@ -89,11 +90,13 @@ public:
89 unsigned int height() const; 90 unsigned int height() const;
90 int ascent() const; 91 int ascent() const;
91 int descent() const; 92 int descent() const;
93
92 /** 94 /**
93 Rotate font in any angle 95 Returns whether we can draw this font in the given orientation.
94 (currently only 90 degrees supported and just XFont implementation) 96 (will instantiate that orientation, so do plan to use it...)
97 @param orient the orientation to test
95 */ 98 */
96 void rotate(float angle); 99 bool validOrientation(FbTk::Orientation orient);
97 100
98 /** 101 /**
99 Draws text to drawable 102 Draws text to drawable
@@ -108,11 +111,8 @@ public:
108 */ 111 */
109 void drawText(const FbDrawable &w, int screen, GC gc, 112 void drawText(const FbDrawable &w, int screen, GC gc,
110 const char *text, size_t len, 113 const char *text, size_t len,
111 int x, int y, bool rotate=true) const; 114 int x, int y, FbTk::Orientation orient = ROT0) const;
112 /// @return true if the font is rotated, else false 115
113 bool isRotated() const { return m_rotated; }
114 /// @return rotated angle
115 float angle() const { return m_angle; }
116 bool hasShadow() const { return m_shadow; } 116 bool hasShadow() const { return m_shadow; }
117 bool hasHalo() const { return m_halo; } 117 bool hasHalo() const { return m_halo; }
118private: 118private:
@@ -123,8 +123,7 @@ private:
123 static bool s_multibyte; ///< if the fontimp should be a multibyte font 123 static bool s_multibyte; ///< if the fontimp should be a multibyte font
124 static bool s_utf8mode; ///< should the font use utf8 font imp 124 static bool s_utf8mode; ///< should the font use utf8 font imp
125 125
126 bool m_rotated; ///< wheter we're rotated or not 126 int m_angle; ///< rotation angle
127 float m_angle; ///< rotation angle
128 bool m_shadow; ///< shadow text 127 bool m_shadow; ///< shadow text
129 Color m_shadow_color; ///< shadow color 128 Color m_shadow_color; ///< shadow color
130 int m_shadow_offx; ///< offset y for shadow 129 int m_shadow_offx; ///< offset y for shadow