summaryrefslogtreecommitdiff
path: root/x11-wm/flwm/files/patch-Rotate.C
blob: 0dc6e545de1a0c232f0e169c562654b2c102cc83 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- Rotated.C.orig	Fri Aug 27 21:53:28 2004
+++ Rotated.C	Fri Aug 27 12:02:59 2004
@@ -27,6 +27,7 @@
 /* ********************************************************************** */
 
 #include <FL/x.H>
+#include <X11/Xft/Xft.h>
 #include <FL/fl_draw.H>
 #include "Rotated.H"
 #include <stdlib.h>
@@ -352,6 +353,7 @@
 static XRotFontStruct* font;
 
 void draw_rotated(const char* text, int n, int x, int y, int angle) {
+#if XFT_MAJOR < 2
   if (!text || !*text) return;
   /* make angle positive ... */
   if (angle < 0) do angle += 360; while (angle < 0);
@@ -365,6 +367,7 @@
     font = XRotLoadFont(fl_display, fl_xfont, dir);
   }
   XRotDrawString(fl_display, font, fl_window, fl_gc, x, y, text, n);
+#endif
 }
 
 #ifndef FLWM