aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Text.hh
diff options
context:
space:
mode:
authorsimonb <simonb>2006-04-04 14:07:07 (GMT)
committersimonb <simonb>2006-04-04 14:07:07 (GMT)
commit42719701dc17b5acef41223fe0237b9154cb3f0a (patch)
treedc2c5567e071fa6d445003439800ba03b328ce20 /src/FbTk/Text.hh
parentc243fa897f37dabeade187ac74ea5cd175e80a22 (diff)
downloadfluxbox-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.hh25
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
79inline 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
80inline void translatePosition(Orientation orient, int &x, int &y, unsigned int w, unsigned int h, unsigned int bw) { 105inline void translatePosition(Orientation orient, int &x, int &y, unsigned int w, unsigned int h, unsigned int bw) {