home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume19 / xfig / part01 / w_rottext.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-27  |  1.8 KB  |  74 lines

  1. /*
  2.  * FIG : Facility for Interactive Generation of figures
  3.  * Copyright (c) 1992 by Alan Richardson
  4.  *
  5.  * "Permission to use, copy, modify, distribute, and sell this software and its
  6.  * documentation for any purpose is hereby granted without fee, provided that
  7.  * the above copyright notice appear in all copies and that both the copyright
  8.  * notice and this permission notice appear in supporting documentation. 
  9.  * No representations are made about the suitability of this software for 
  10.  * any purpose.  It is provided "as is" without express or implied warranty."
  11.  */
  12.  
  13. #define TLEFT     1
  14. #define TCENTRE     2
  15. #define TRIGHT     3
  16. #define MLEFT     4
  17. #define MCENTRE     5
  18. #define MRIGHT     6
  19. #define BLEFT     7
  20. #define BCENTRE     8
  21. #define BRIGHT     9
  22.  
  23.  
  24. /* ---------------------------------------------------------------------- */
  25.  
  26.  
  27. /* *** The font structures *** */
  28.  
  29. typedef struct
  30. { int         bit_w;
  31.   int         bit_h;
  32.  
  33.   Pixmap     bm;         } BitmapStruct;
  34.  
  35. typedef struct
  36. { int         ascent;
  37.   int         descent;
  38.   int          lbearing;
  39.   int         rbearing;
  40.   int         width;
  41.  
  42.   BitmapStruct     glyph;        } XRotCharStruct;
  43.  
  44. typedef struct
  45. { int         dir;
  46.   int         height;    /* max_ascent+max_descent */
  47.   int         width;        /* max_bounds.width from XFontStruct */
  48.   int         max_ascent;
  49.   int         max_descent;
  50.   int         max_char;
  51.   int         min_char;
  52.   char        *name;
  53.  
  54.   XFontStruct    *xfontstruct;
  55.  
  56.   XRotCharStruct per_char[95];    } XRotFontStruct;
  57.  
  58.  
  59. /* ---------------------------------------------------------------------- */
  60.  
  61.  
  62. extern XRotFontStruct         *XRotLoadFont();
  63. extern void                       XRotUnloadFont();
  64. extern int                        XRotTextWidth();
  65. extern int                        XRotTextHeight();
  66. extern void                       XRotDrawString();
  67. extern void                       XRotDrawImageString();
  68. extern void                       XRotDrawAlignedString();
  69. extern void                       XRotDrawAlignedImageString();
  70.  
  71.  
  72.  
  73.  
  74.