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

  1. /*
  2.  * FIG : Facility for Interactive Generation of figures
  3.  * Copyright (c) 1985 by Supoj Sutanthavibul
  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. extern pr_size    pf_textwidth();
  14. extern PIX_FONT bold_font;
  15. extern PIX_FONT roman_font;
  16. extern PIX_FONT button_font;
  17. extern PIX_ROT_FONT canvas_font;
  18.  
  19. /* Maximum number of points for polygons etc */
  20. #define        MAXNUMPTS    10000
  21.  
  22. #define        NORMAL_FONT    "fixed"
  23. #define        BOLD_FONT    "8x13bold"
  24. #define        BUTTON_FONT    "6x13"
  25.  
  26. #define        char_height(font) \
  27.         ((font)->max_bounds.ascent + (font)->max_bounds.descent)
  28.  
  29. #define        rot_char_width(rotfont)    ((rotfont)->width)
  30. #define        rot_char_height(rotfont) \
  31.         ((rotfont)->max_ascent + (rotfont)->max_descent)
  32.  
  33. #define        rot_char_advance(font,char) \
  34.             (((font)->per_char)?\
  35.             ((font)->per_char[(char)-(font)->min_char].width):\
  36.             ((font)->width))
  37.  
  38. #define set_x_color(gc,col) XSetForeground(tool_d,gc,\
  39.     (!all_colors_available? (col==WHITE?x_bg_color.pixel:x_fg_color.pixel): \
  40.     (col<0||col>=NUMCOLORS)? x_fg_color.pixel:appres.color[col]))
  41.  
  42. #define x_color(col)\
  43.     (!all_colors_available? (col==WHITE?x_bg_color.pixel:x_fg_color.pixel): \
  44.     (col<0||col>=NUMCOLORS)? x_fg_color.pixel:appres.color[col])
  45.