diff options
| -rw-r--r-- | draw.c | 22 |
1 files changed, 11 insertions, 11 deletions
| @@ -6,17 +6,6 @@ | |||
| 6 | 6 | ||
| 7 | /* static */ | 7 | /* static */ |
| 8 | 8 | ||
| 9 | static unsigned int | ||
| 10 | textnw(const char *text, unsigned int len) { | ||
| 11 | XRectangle r; | ||
| 12 | |||
| 13 | if(dc.font.set) { | ||
| 14 | XmbTextExtents(dc.font.set, text, len, NULL, &r); | ||
| 15 | return r.width; | ||
| 16 | } | ||
| 17 | return XTextWidth(dc.font.xfont, text, len); | ||
| 18 | } | ||
| 19 | |||
| 20 | static void | 9 | static void |
| 21 | drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) { | 10 | drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) { |
| 22 | int x; | 11 | int x; |
| @@ -48,6 +37,17 @@ isoccupied(unsigned int t) { | |||
| 48 | return False; | 37 | return False; |
| 49 | } | 38 | } |
| 50 | 39 | ||
| 40 | static unsigned int | ||
| 41 | textnw(const char *text, unsigned int len) { | ||
| 42 | XRectangle r; | ||
| 43 | |||
| 44 | if(dc.font.set) { | ||
| 45 | XmbTextExtents(dc.font.set, text, len, NULL, &r); | ||
| 46 | return r.width; | ||
| 47 | } | ||
| 48 | return XTextWidth(dc.font.xfont, text, len); | ||
| 49 | } | ||
| 50 | |||
| 51 | /* extern */ | 51 | /* extern */ |
| 52 | 52 | ||
| 53 | void | 53 | void |
