home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / TCL / BLT / BLT1.7L1 / BLT1 / blt-1.7 / src / bltGraph.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-22  |  19.6 KB  |  567 lines

  1. /*
  2.  * bltGraph.h --
  3.  *
  4.  * Copyright 1991-1994 by AT&T Bell Laboratories.
  5.  * Permission to use, copy, modify, and distribute this software
  6.  * and its documentation for any purpose and without fee is hereby
  7.  * granted, provided that the above copyright notice appear in all
  8.  * copies and that both that the copyright notice and warranty
  9.  * disclaimer appear in supporting documentation, and that the
  10.  * names of AT&T Bell Laboratories any of their entities not be used
  11.  * in advertising or publicity pertaining to distribution of the
  12.  * software without specific, written prior permission.
  13.  *
  14.  * AT&T disclaims all warranties with regard to this software, including
  15.  * all implied warranties of merchantability and fitness.  In no event
  16.  * shall AT&T be liable for any special, indirect or consequential
  17.  * damages or any damages whatsoever resulting from loss of use, data
  18.  * or profits, whether in an action of contract, negligence or other
  19.  * tortuous action, arising out of or in connection with the use or
  20.  * performance of this software.
  21.  *
  22.  * Graph widget created by Sani Nassif and George Howlett.
  23.  */
  24.  
  25. #ifndef _GRAPH_H
  26. #define _GRAPH_H
  27.  
  28. #include <math.h>
  29. #ifdef HAVE_FLOAT_H
  30. #include <float.h>
  31. #endif
  32. #ifdef HAVE_LIMITS_H
  33. #include <limits.h>
  34. #endif
  35.  
  36. /*
  37.  * ----------------------------------------------------------------------
  38.  *
  39.  * MAX_DBL_VALUE and MIN_DBL_VALUE are the largest and small values
  40.  * representable on the graph or barchart.  They are used for the
  41.  * following:
  42.  *
  43.  * 1. when searching for smallest or largest value of a set,
  44.  *    initialize current min/max to this.
  45.  *
  46.  * 2. represent tag coordinates "Inf" and "-Inf".
  47.  * ----------------------------------------------------------------------
  48.  */
  49. #ifdef HAVE_FLOAT_H
  50. #define MAX_DBL_VALUE     DBL_MAX
  51. #define MIN_DBL_VALUE    DBL_MIN
  52. #else
  53. /* Don't want to include __infinity (definition of HUGE_VAL (SC1.x)) */
  54. #ifdef sun
  55. #define MAX_DBL_VALUE    1.7976931348623157E+308
  56. #define MIN_DBL_VALUE     2.2250738585072014E-308
  57. #else
  58. /* Start to go into punt formation. */
  59. #ifdef HUGE_VAL
  60. #define MAX_DBL_VALUE   HUGE_VAL
  61. #define MIN_DBL_VALUE   (1/HUGE_VAL)
  62. #ifdef HUGE
  63. #define MAX_DBL_VALUE    HUGE
  64. #define MIN_DBL_VALUE    (1/HUGE)
  65. #else
  66. /* Punt: Assume something simple and relatively small */
  67. #define MAX_DBL_VALUE    3.40282347E+38
  68. #define MIN_DBL_VALUE     1.17549435E-38
  69. #endif /*HUGE*/
  70. #endif /*HUGE_VAL*/
  71. #endif /*sun*/
  72. #endif /*HAVE_FLOAT_H*/
  73.  
  74. #define MAX_POS_VAL    MAX_DBL_VALUE
  75. #define MAX_NEG_VAL    (-MAX_DBL_VALUE)
  76.  
  77. #undef BLT_MIN
  78. #define BLT_MIN(a,b)    (((a)<(b))?(a):(b))
  79.  
  80. #undef BLT_MAX
  81. #define BLT_MAX(a,b)    (((a)>(b))?(a):(b))
  82.  
  83. /*
  84.  * ------------------------------------------------------------------------
  85.  *
  86.  * Definitions of macros replacing math library functions, fabs, abs,
  87.  * rint, and exp10.
  88.  *
  89.  * Although many of these routines may be in your math library, they
  90.  * aren't used in libtcl.a or libtk.a.  This makes it impossible to
  91.  * load BLT library as a shared object without requiring that the math
  92.  * library be a shared object too.  We avoid the problem by replacing
  93.  * the "exotic" math routines with macros.
  94.  *
  95.  * ------------------------------------------------------------------------
  96.  */
  97. #undef BLT_FABS
  98. #define BLT_FABS(x)     (((x)<0.0)?(-(x)):(x))
  99.  
  100. #undef BLT_ABS
  101. #define BLT_ABS(x)     (((x)<0)?(-(x)):(x))
  102.  
  103. #undef BLT_RND
  104. #define BLT_RND(x)     ((int)((x) + (((x)<0.0) ? -0.5 : 0.5)))
  105.  
  106. #undef BLT_EXP10
  107. #define BLT_EXP10(x)    (pow(10.0,(x)))
  108.  
  109. #ifndef M_PI
  110. #define M_PI        3.14159265358979323846
  111. #endif /* M_PI */
  112.  
  113. #ifndef M_SQRT2
  114. #define M_SQRT2        1.41421356237309504880
  115. #endif /* M_SQRT1_2 */
  116.  
  117. #ifndef M_SQRT1_2
  118. #define M_SQRT1_2    0.70710678118654752440
  119. #endif /* M_SQRT1_2 */
  120.  
  121. #ifndef SHRT_MAX
  122. #define SHRT_MAX    0x7FFF
  123. #endif /* SHRT_MAX */
  124.  
  125. #define TRUE 1
  126. #define FALSE 0
  127.  
  128. /*
  129.  * Mask values used to selectively enable GRAPH or BARCHART entries in
  130.  * the various configuration specs.
  131.  */
  132. #define XYGRAPH_MASK    TK_CONFIG_USER_BIT
  133. #define BARCHART_MASK    TK_CONFIG_USER_BIT << 1
  134. #define ALL_MASK    (XYGRAPH_MASK | BARCHART_MASK)
  135. #define CONTOUR_MASK    TK_CONFIG_USER_BIT << 2
  136.  
  137. #define PADX        2    /* Padding between labels/titles */
  138. #define PADY        2    /* Padding between labels */
  139. #define TEXTHEIGHT(f)     ((f)->ascent + (f)->descent)
  140. #define DEF_POSITION     -SHRT_MAX    /* Indicates that no position was
  141.                      * specified */
  142.  
  143. /*
  144.  * -------------------------------------------------------------------
  145.  *
  146.  *     Graph component structure definitions
  147.  *
  148.  * -------------------------------------------------------------------
  149.  */
  150. typedef struct Graph Graph;
  151. typedef struct GraphAxis GraphAxis;
  152. typedef struct GraphLegend GraphLegend;
  153. typedef struct GraphPostScript GraphPostScript;
  154. typedef struct GraphCrosshairs GraphCrosshairs;
  155.  
  156. /*
  157.  * -------------------------------------------------------------------
  158.  *
  159.  * GraphClassType --
  160.  *
  161.  *    Enumerates the different types of graphs this program
  162.  *    produces. Currently, only one this of graph is allowed
  163.  *    on a single axis.
  164.  *
  165.  * -------------------------------------------------------------------
  166.  */
  167. typedef enum {
  168.     GRAPH, BARCHART, CONTOUR
  169. } GraphClassType;
  170.  
  171. /*
  172.  * -------------------------------------------------------------------
  173.  *
  174.  * TextAttributes --
  175.  *
  176.  *     Represents a convenience structure to hold text attributes
  177.  *    which determine how a text string is to be displayed on the
  178.  *    window, or drawn with PostScript commands.  The alternative
  179.  *    is to have drawing and printing routines with more parameters.
  180.  *     This seems like a more efficient and less cumbersome way.
  181.  *
  182.  * -------------------------------------------------------------------
  183.  */
  184. typedef struct {
  185.     char *text;            /* Text string to be displayed  */
  186.     XFontStruct *fontPtr;    /* Font to use for string */
  187.     XColor *bgColorPtr;        /* Background color of string */
  188.     XColor *fgColorPtr;        /* Foreground color of string */
  189.     Tk_Anchor anchor;        /* Anchor type: used to position the
  190.                  * string */
  191.     double theta;        /* Rotation of text in degrees. */
  192.     GC gc;            /* Graphics context to use when displaying
  193.                  * the string on the window */
  194. } TextAttributes;
  195.  
  196. /*
  197.  * -------------------------------------------------------------------
  198.  *
  199.  * AxisTypes --
  200.  *
  201.  *    Enumerated type representing the types of axes
  202.  *
  203.  * -------------------------------------------------------------------
  204.  */
  205. typedef enum AxisTypes {
  206.     X1_AXIS, Y1_AXIS, X2_AXIS, Y2_AXIS
  207. } AxisType;
  208.  
  209. #define AXIS_MASK(a)    (1<<((a)->type))
  210. #define X_AXIS(a)        (!((a)->type&1))
  211. #define Y_AXIS(a)    ((a)->type&1)
  212.  
  213. /* AxisFlags used by elements and tags */
  214. #define X1_AXIS_MASK    (1<<X1_AXIS)
  215. #define Y1_AXIS_MASK    (1<<Y1_AXIS)
  216. #define X2_AXIS_MASK    (1<<X2_AXIS)
  217. #define Y2_AXIS_MASK    (1<<Y2_AXIS)
  218.  
  219. #define STD_AXES_MASK    (X1_AXIS_MASK|Y1_AXIS_MASK)
  220. #define ANY_X_MASK    (X1_AXIS_MASK|X2_AXIS_MASK)
  221. #define ANY_Y_MASK    (Y1_AXIS_MASK|Y2_AXIS_MASK)
  222.  
  223. typedef enum AxisLocations {
  224.     BOTTOM_AXIS, LEFT_AXIS, TOP_AXIS, RIGHT_AXIS
  225. } AxisLocation;
  226.  
  227. /*
  228.  * -------------------------------------------------------------------
  229.  *
  230.  * GraphAxis --
  231.  *
  232.  *     Structure contains options controlling how the axis will be
  233.  *     displayed.
  234.  *
  235.  * -------------------------------------------------------------------
  236.  */
  237.  
  238. typedef void (AxisDisplayProc) _ANSI_ARGS_((Graph *graphPtr,
  239.     GraphAxis *axisPtr, TextAttributes * attrPtr));
  240. typedef void (AxisPrintProc) _ANSI_ARGS_((Graph *graphPtr, GraphAxis *axisPtr,
  241.     TextAttributes * attrPtr));
  242. typedef void (AxisLayoutProc) _ANSI_ARGS_((Graph *graphPtr,
  243.     GraphAxis *axisPtr));
  244. typedef void (AxisDestroyProc) _ANSI_ARGS_((Graph *graphPtr,
  245.     GraphAxis *axisPtr));
  246.  
  247. struct GraphAxis {
  248.     enum AxisTypes type;
  249.     enum AxisLocations location;/* Location of the axis: right, left, etc. */
  250.     int logScale;        /* If non-zero, scale values
  251.                  * logarithmically */
  252.     int mapped;            /* If non-zero, display the axis */
  253.  
  254.     AxisDisplayProc *displayProc;
  255.     AxisPrintProc *printProc;
  256.     AxisLayoutProc *layoutProc;
  257.     AxisDestroyProc *destroyProc;
  258. };
  259.  
  260. /*
  261.  * -------------------------------------------------------------------
  262.  *
  263.  * GraphLegend --
  264.  *
  265.  *     Contains information specific to how the legend will be
  266.  *    displayed.
  267.  *
  268.  * -------------------------------------------------------------------
  269.  */
  270.  
  271. typedef void (LegendDisplayProc) _ANSI_ARGS_((Graph *graphPtr));
  272. typedef void (LegendPrintProc) _ANSI_ARGS_((Graph *graphPtr));
  273. typedef void (LegendDestroyProc) _ANSI_ARGS_((Graph *graphPtr));
  274. typedef void (LegendGeometryProc) _ANSI_ARGS_((Graph *graphPtr, int height));
  275.  
  276. struct GraphLegend {
  277.     int mapped;            /* Requested state of the legend, If
  278.                  * non-zero, legend is displayed */
  279.     int width, height;        /* Dimensions of the legend */
  280.     XPoint anchorPos;        /* Window coordinates of legend
  281.                  * positioning point. Used in conjunction
  282.                  * with the anchor to determine the
  283.                  * location of the legend. */
  284.     int useDefault;        /* Draw the legend in the default location */
  285.  
  286.     LegendDisplayProc *displayProc;
  287.     LegendPrintProc *printProc;
  288.     LegendDestroyProc *destroyProc;
  289.     LegendGeometryProc *geomProc;
  290. };
  291.  
  292. /*
  293.  * -------------------------------------------------------------------
  294.  *
  295.  * GraphPostScript --
  296.  *
  297.  *     Structure contains information specific to the outputting of
  298.  *    PostScript commands to print the graph.
  299.  *
  300.  * -------------------------------------------------------------------
  301.  */
  302.  
  303. typedef int (PostScriptConfigureProc) _ANSI_ARGS_((Graph *graphPtr, int argc,
  304.     char **argv));
  305. typedef int (PostScriptPrintProc) _ANSI_ARGS_((Graph *graphPtr, int argc,
  306.     char **argv));
  307. typedef void (PostScriptDestroyProc) _ANSI_ARGS_((Graph *graphPtr));
  308.  
  309. struct GraphPostScript {
  310.     PostScriptConfigureProc *configProc;
  311.     PostScriptPrintProc *printProc;
  312.     PostScriptDestroyProc *destroyProc;
  313. };
  314.  
  315. /*
  316.  * -------------------------------------------------------------------
  317.  *
  318.  * GraphCrosshairs --
  319.  *
  320.  *    Contains the line segments positions and graphics context used
  321.  *    to simulate crosshairs (by XORing) on the graph.
  322.  *
  323.  * -------------------------------------------------------------------
  324.  */
  325. typedef void (CrosshairsToggleProc) _ANSI_ARGS_((Graph *graphPtr));
  326. typedef void (CrosshairsUpdateProc) _ANSI_ARGS_((Graph *graphPtr));
  327. typedef void (CrosshairsConfigProc) _ANSI_ARGS_((Graph *graphPtr));
  328. typedef void (CrosshairsDestroyProc) _ANSI_ARGS_((Graph *graphPtr));
  329.  
  330. struct GraphCrosshairs {
  331.     CrosshairsToggleProc *toggleProc;    /* Toggle visiblity of crosshairs */
  332.     CrosshairsUpdateProc *updateProc;    /* Update lengths of hairs */
  333.     CrosshairsConfigProc *configProc;    /* Configure GC */
  334.     CrosshairsDestroyProc *destroyProc;    /* Release X resources */
  335. };
  336.  
  337. /*
  338.  * -------------------------------------------------------------------
  339.  *
  340.  * Graph --
  341.  *
  342.  *    Top level structure containing everything pertaining to
  343.  *    the graph.
  344.  *
  345.  * -------------------------------------------------------------------
  346.  */
  347. struct Graph {
  348.     Tk_Window tkwin;        /* Window that embodies the graph.  NULL
  349.                  * means that the window has been
  350.                  * destroyed but the data structures
  351.                  * haven't yet been cleaned up. */
  352.     Pixmap canvas;        /* Pixmap for double buffering output */
  353.     Display *display;        /* Display containing widget; needed,
  354.                  * among other things, to release
  355.                  * resources after tkwin has already gone
  356.                  * away. */
  357.     char *pathName;        /* Pathname of the widget. Is saved here
  358.                  * in case the widget is destroyed and
  359.                  * tkwin become unavailable for querying
  360.                  * */
  361.     Tcl_Interp *interp;        /* Interpreter associated with graph */
  362.     GraphClassType type;    /* Type: either GRAPH or BARCHART */
  363.     unsigned int flags;        /* Flags;  see below for definitions. */
  364.  
  365.     GraphPostScript *postscript;/* PostScript options: see bltGrPS.c */
  366.     GraphLegend *legendPtr;    /* Legend information: see bltGrLegd.c */
  367.     GraphAxis *axisArr[4];    /* Coordinate axis info: see bltGrAxis.c */
  368.     GraphAxis *bottomAxis, *topAxis, *leftAxis, *rightAxis;
  369.     GraphCrosshairs *crosshairs;/* Crosshairs information: see
  370.                    bltGrHairs.c */
  371.     Tcl_HashTable elemTable;    /* Hash table containing all elements
  372.                  * created, not just those currently
  373.                  * displayed. */
  374.     Blt_LinkedList elemList;    /* Display list of elements */
  375.     Tcl_HashTable tagTable;    /* Hash table of tags */
  376.     Blt_LinkedList tagList;    /* Display list of tags */
  377.     unsigned int nextTagId;    /* Tracks next tag identifier available */
  378.  
  379.     int reqWidth, reqHeight;    /* Requested size of graph window */
  380.     int halo;            /* Maximum distance allowed between points
  381.                  * when searching for a point */
  382.     unsigned int buffered;    /* If non-zero, cache elements by drawing
  383.                  * them into a pixmap */
  384.     unsigned int inverted;    /* If non-zero, indicates the x and y axis
  385.                  * positions should be inverted. */
  386.     double barWidth;        /* Scale factor for the width of bar */
  387.  
  388.     int leftMargin;        /* Requested sizes for margins surrounding */
  389.     int rightMargin;        /* the plotting area. If non-zero, the */
  390.     int topMargin;        /* requested margin is used, otherwise the */
  391.     int bottomMargin;        /* computed margin sizes are used. */
  392.  
  393.     char *title;        /* Graph title */
  394.  
  395.     XFontStruct *fontPtr;    /* Font for graph and axis titles */
  396.     Cursor cursor;
  397.  
  398.     int borderWidth;        /* Width the exterior border */
  399.     int relief;            /* Relief of the exterior border */
  400.     Tk_3DBorder border;        /* 3-D border used to delineate the plot
  401.                  * surface and outer edge of window */
  402.     XColor *marginFg;        /* Foreground color of title and axis
  403.                  * labels */
  404.     int plotBW;            /* Width of interior 3-D border. */
  405.     int plotRelief;        /* 3-d effect: TK_RELIEF_RAISED etc. */
  406.     XColor *plotBg;        /* Color of plotting surface */
  407.  
  408.     GC plotFillGC;        /* GC to fill the plotting area with a
  409.                  * solid background color. The fill color
  410.                  * is stored in "plotBg". */
  411.     GC marginGC;        /* Graphics context for margin. Includes
  412.                  * margin background */
  413.     GC marginFillGC;        /* GC to fill the background of the
  414.                  * margins, clipping the plotting
  415.                  * area. The fill color is obtained
  416.                  * from "border". */
  417.  
  418.     double avgSymSize;        /* Average size of a symbol */
  419.  
  420.     int width, height;        /* Size of graph window or PostScript
  421.                  * page */
  422.     XPoint origin;        /* Origin of the graph */
  423.     XPoint extreme;        /* Outer limit of graph */
  424.  
  425.     Pixmap elemMap;        /* For double buffering the display of
  426.                  * graph elements */
  427.     unsigned int elemWidth;    /* Dimensions of element buffer pixmap */
  428.     unsigned int elemHeight;
  429.     char *scratchPtr;        /* Utility space for building strings.
  430.                  * Points to buffer of BUFSIZ bytes on
  431.                  * the stack.  Currently used to
  432.                  * create PostScript output for the
  433.                  * "postscript" command. */
  434.  
  435.  
  436. };
  437.  
  438. /*
  439.  * Flag bits for graphs:
  440.  */
  441.  
  442. #define    LAYOUT_NEEDED     (1<<0)    /* Indicates that one of the many
  443.                  * graph configurations has changed
  444.                  * (element, tag, axis, legend, etc)
  445.                  * and the layout of the graph
  446.                  * (position of the graph in the
  447.                  * window) needs to be recalculated. */
  448.  
  449. #define    LAYOUT_DIRTY    (1<<1)    /* Non-zero indicates that the layout
  450.                  * of the axes and all elements and
  451.                  * tags and the graph need to be
  452.                  * recalculated. Otherwise, the layout
  453.                  * of only those tags and elements that
  454.                  * have changed will be reset. */
  455.  
  456. #define    LAYOUT_ALL     (LAYOUT_NEEDED|LAYOUT_DIRTY)
  457.  
  458. #define REDRAW_PENDING     (1<<3)    /* Non-zero means a DoWhenIdle
  459.                  * handler has already been queued to
  460.                  * redraw this window. */
  461.  
  462. #define REFRESH        (1<<4)    /* Non-zero means that exterior
  463.                  * region of the graph, in addition to
  464.                  * the interior (plotting surface)
  465.                  * needs to be redrawn. The possible
  466.                  * reasons are:
  467.                  *
  468.                  * 1) an axis configuration changed
  469.                  *
  470.                  * 2) an axis limit changed
  471.                  *
  472.                  * 3) titles have changed
  473.                  *
  474.                  * 4) window was resized.
  475.                  */
  476.  
  477. #define LEGEND_ONLY    (1<<5)    /* Non-zero means that only the legend
  478.                  * need to be redrawn. In this case, the
  479.                  * legend display routine is called instead
  480.                  * of the graph display routine. */
  481.  
  482.  
  483. #define    DIRTY        (1<<6)    /* If set, redraw all elements into the
  484.                  * pixmap used for buffering elements. */
  485.  
  486. /*
  487.  * ---------------------- Forward declarations ------------------------
  488.  */
  489. extern Pixmap Blt_CreateTextBitmap _ANSI_ARGS_((Display * display,
  490.     Drawable draw, XFontStruct *fontPtr, char *textStr, double theta,
  491.     unsigned int *bmWPtr, unsigned int *bmHPtr));
  492. extern void Blt_DrawText _ANSI_ARGS_((Display * display, Drawable draw,
  493.     char *text, TextAttributes * attrPtr, int x, int y));
  494. extern void Blt_RedrawGraph _ANSI_ARGS_((Graph *graphPtr));
  495. extern void Blt_GetBoundingBox _ANSI_ARGS_((unsigned int width,
  496.     unsigned int height, double theta, unsigned int *widthPtr,
  497.     unsigned int *heightPtr, XPoint *pointArr));
  498. extern Pixmap Blt_RotateBitmap _ANSI_ARGS_((Display * display, Drawable draw,
  499.     GC gc, Pixmap bitmap, unsigned int width, unsigned int height,
  500.     double theta, unsigned int *rotWPtr, unsigned int *rotHPtr));
  501. extern void Blt_ComputeAxes _ANSI_ARGS_((Graph *graphPtr));
  502.  
  503. extern int Blt_Transform _ANSI_ARGS_((GraphAxis *axis, double value));
  504. extern double Blt_InvTransform _ANSI_ARGS_((GraphAxis *axis, int coord));
  505. extern XPoint Blt_TransformPt _ANSI_ARGS_((Graph *graphPtr, double x, double y,
  506.     unsigned int axisFlags));
  507. extern int Blt_TransformDist _ANSI_ARGS_((GraphAxis *axis, double value));
  508.  
  509. extern void Blt_StencilBitmap _ANSI_ARGS_((Display * display, Drawable draw,
  510.     GC gc, Pixmap bitmap, int x, int y, unsigned int width,
  511.     unsigned int height));
  512. extern unsigned int Blt_TextStringWidth _ANSI_ARGS_((XFontStruct *fontPtr,
  513.     char *text));
  514. extern XPoint Blt_TranslateBoxCoords _ANSI_ARGS_((int x, int y,
  515.     unsigned int width, unsigned int height, Tk_Anchor anchor));
  516. extern XPoint Blt_TranslateTextCoords _ANSI_ARGS_((XFontStruct *fontPtr,
  517.     char *text, int x, int y, Tk_Anchor anchor));
  518.  
  519. extern void Blt_PrintLine _ANSI_ARGS_((Graph *graphPtr, XPoint *pointArr,
  520.     int numPoints));
  521. extern void Blt_PrintBitmap _ANSI_ARGS_((Graph *graphPtr, Pixmap bitmap, int x,
  522.     int y, unsigned int width, unsigned int height));
  523. extern void Blt_SetLineAttributes _ANSI_ARGS_((Graph *graphPtr,
  524.     XColor *colorPtr, int lineWidth, int lineDashes));
  525. extern void Blt_3DRectangleToPostScript _ANSI_ARGS_((Graph *graphPtr,
  526.     Tk_3DBorder border, int x, int y, unsigned int width,
  527.     unsigned int height, int borderWidth, int relief));
  528. extern void Blt_BackgroundToPostScript _ANSI_ARGS_((Graph *graphPtr,
  529.     XColor *colorPtr));
  530. extern void Blt_BitmapToPostScript _ANSI_ARGS_((Graph *graphPtr, Pixmap bitmap,
  531.     int x, int y, unsigned int width, unsigned int height, double theta,
  532.     XColor *bgColorPtr));
  533. extern void Blt_FontToPostScript _ANSI_ARGS_((Graph *graphPtr,
  534.     XFontStruct *fontPtr));
  535. extern void Blt_ForegroundToPostScript _ANSI_ARGS_((Graph *graphPtr,
  536.     XColor *colorPtr));
  537. extern void Blt_LineDashesToPostScript _ANSI_ARGS_((Graph *graphPtr,
  538.     int lineDashes));
  539. extern void Blt_LineWidthToPostScript _ANSI_ARGS_((Graph *graphPtr,
  540.     int lineWidth));
  541. extern void Blt_LinesToPostScript _ANSI_ARGS_((Graph *graphPtr,
  542.     XPoint *pointArr, int numPoints));
  543. extern void Blt_PolygonToPostScript _ANSI_ARGS_((Graph *graphPtr,
  544.     XPoint *pointArr, int numPoints));
  545. extern void Blt_Print3DRectangle _ANSI_ARGS_((Graph *graphPtr,
  546.     Tk_3DBorder border, int x, int y, unsigned int width,
  547.     unsigned int height, int borderWidth, int relief));
  548. extern void Blt_RectangleToPostScript _ANSI_ARGS_((Graph *graphPtr,
  549.     int x, int y, unsigned int width, unsigned int height));
  550. extern void Blt_RectanglesToPostScript _ANSI_ARGS_((Graph *graphPtr,
  551.     XRectangle *rectArr, int numRects));
  552. extern void Blt_SegmentsToPostScript _ANSI_ARGS_((Graph *graphPtr,
  553.     XSegment *segArr, int numSegs));
  554. extern void Blt_StippleToPostScript _ANSI_ARGS_((Graph *graphPtr,
  555.     Pixmap bitmap, unsigned int width, unsigned int height, int fgOrBg));
  556. extern void Blt_TextToPostScript _ANSI_ARGS_((Graph *graphPtr, char *text,
  557.     TextAttributes * attrPtr, int x, int y));
  558. extern int Blt_GetTokenIndex _ANSI_ARGS_((char **list, char *key, int flag));
  559. extern int Blt_OptionChanged _ANSI_ARGS_(VARARGS);
  560.  
  561. /*
  562.  * ---------------------- Global declarations ------------------------
  563.  */
  564. extern double Blt_negInfinity, Blt_posInfinity;
  565.  
  566. #endif /* _GRAPH_H */
  567.