diff options
author | simonb <simonb> | 2006-04-04 14:07:07 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-04 14:07:07 (GMT) |
commit | 42719701dc17b5acef41223fe0237b9154cb3f0a (patch) | |
tree | dc2c5567e071fa6d445003439800ba03b328ce20 /src/FbTk/Text.hh | |
parent | c243fa897f37dabeade187ac74ea5cd175e80a22 (diff) | |
download | fluxbox-42719701dc17b5acef41223fe0237b9154cb3f0a.zip fluxbox-42719701dc17b5acef41223fe0237b9154cb3f0a.tar.bz2 |
rotated Xmb Fonts, by rotating as we draw
Diffstat (limited to 'src/FbTk/Text.hh')
-rw-r--r-- | src/FbTk/Text.hh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/FbTk/Text.hh b/src/FbTk/Text.hh index ceb0f19..5336546 100644 --- a/src/FbTk/Text.hh +++ b/src/FbTk/Text.hh | |||
@@ -75,6 +75,31 @@ inline void translateCoords(Orientation orient, int &x, int &y, unsigned int w, | |||
75 | 75 | ||
76 | } | 76 | } |
77 | 77 | ||
78 | // still require w and h in ROT0 coords | ||
79 | inline void untranslateCoords(Orientation orient, int &orig_x, int &orig_y, unsigned int w, unsigned int h) { | ||
80 | |||
81 | int x = orig_x; | ||
82 | int y = orig_y; | ||
83 | |||
84 | switch(orient) { | ||
85 | case ROT0: | ||
86 | break; | ||
87 | case ROT90: | ||
88 | orig_y = h - x; | ||
89 | orig_x = y; | ||
90 | break; | ||
91 | case ROT180: | ||
92 | orig_x = w - x; | ||
93 | orig_y = h - y; | ||
94 | break; | ||
95 | case ROT270: | ||
96 | orig_y = x; | ||
97 | orig_x = w - y; | ||
98 | break; | ||
99 | } | ||
100 | |||
101 | } | ||
102 | |||
78 | // When positioning an X11 box inside another area, we need to | 103 | // When positioning an X11 box inside another area, we need to |
79 | // relocate the x,y coordinates | 104 | // relocate the x,y coordinates |
80 | inline void translatePosition(Orientation orient, int &x, int &y, unsigned int w, unsigned int h, unsigned int bw) { | 105 | inline void translatePosition(Orientation orient, int &x, int &y, unsigned int w, unsigned int h, unsigned int bw) { |