Back to index

plt-scheme  4.2.1
plstrm.h
Go to the documentation of this file.
00001 /* $Id: plstrm.h,v 1.1 2004/03/01 20:54:53 cozmic Exp $
00002  *
00003  *     Contains declarations for PLStream and PLDev structs.
00004  *     Also prototypes for stream & device utility functions.
00005 */
00006 
00007 #include "pdf.h"
00008 
00009 #ifndef __PLSTRM_H__
00010 #define __PLSTRM_H__
00011 
00012 #include "disptab.h"
00013 
00014 /*--------------------------------------------------------------------------*\
00015  * Define the PLDev data structure.
00016  *
00017  * These are all quantities that must be saved on a per-device basis.
00018  * Some drivers (xwin, tk) allocate structures defined internally.
00019 \*--------------------------------------------------------------------------*/
00020 
00021 typedef struct {
00022     PLFLT pxlx, pxly;
00023     PLINT xold, yold;
00024 
00025     PLINT xmin, xmax, xlen;
00026     PLINT ymin, ymax, ylen;
00027 
00028     PLINT xmin_dev, xmax_dev, xlen_dev;
00029     PLINT ymin_dev, ymax_dev, ylen_dev;
00030 
00031     PLFLT xscale_dev, yscale_dev;
00032 } PLDev;
00033 
00034 /*--------------------------------------------------------------------------*\
00035  * Define the PLStream data structure.
00036  *
00037  * This contains a copy of every variable that is stream dependent, which
00038  * tends to be those which are settable by the user and persist for longer
00039  * than one plot.
00040  *
00041  * Only those quantities listed in the PLStream struct will be preserved
00042  * for an individual stream.  Note that the lack of every plplot constant
00043  * means that one should only switch streams at a fairly high level, i.e.
00044  * on the scale of an entire plot.  Otherwise intermediate quantities
00045  * will be confused between the streams, possibly resulting in garbage plots.
00046  * This structure may be expanded in time to improve intra-stream independence,
00047  * but it is doubtful streams will ever be fully independent (perhaps
00048  * neither necessary nor desirable? -- time will tell).
00049  *
00050  * There are undoubtably some inconsistencies in the declaration & use of
00051  * the variables below.  This is a result of the continuing evolution of
00052  * plplot and the numerous authors involved.  Hopefully in time the function
00053  * of all variables can be fully documented and made more consistent.
00054  *
00055  * The quantities in each stream are as follows:
00056  *
00057  ***************************************************************************
00058  *
00059  * Misc control variables
00060  *
00061  * ipls              PLINT  Stream number
00062  * level      PLINT  Initialization level
00063  * program    char*  Program name
00064  * verbose    PLINT  Be more verbose than usual
00065  * debug      PLINT  Generate debugging output
00066  * initialized       PLINT  Set if the stream has been initialized
00067  * dev_initialized PLINT Set if the device driver has been loaded
00068  *
00069  ***************************************************************************
00070  *
00071  * Palettes (two of them)
00072  *
00073  * Color map 0 is intended for static objects, such as boxes, lines, points,
00074  * labels, etc.  These should be allocated before calling plinit (else you
00075  * get 16 by default, which can be undesirable on some platforms).  These
00076  * are then explicitly selected by number (in order of allocation).  The
00077  * lowest number is 0, but this is used for the background color, so all
00078  * color drivers start with 1 as the default color.
00079  *
00080  * Color map 1 is for continuous-tone plots, where color is used to
00081  * represent function value or intensity.  These are set in a relative way
00082  * only, for increased portability and flexibility.  The actual number of
00083  * colors used to represent intensity levels is determined by the driver.
00084  * Note that it is only necessary to specify intensity (on a scale from 0
00085  * to 1) to get an appropriate color.  Drivers incapable of fine shading
00086  * will do the best job they can.
00087  *
00088  * A palette selection tool for both palettes is available for the Tk
00089  * driver.  Direct writing of RGB values (i.e.  banging on the hardware) is
00090  * supported but highly discouraged (colors so written will be affected
00091  * unpredictably by the palette tools).
00092  *
00093  * icol0      PLINT  Color map 0 entry, current color (0 <= icol0 <= ncol0)
00094  * ncol0      PLINT  Number of colors allocated in color map 0.
00095  * icol1      PLINT  Color map 1 entry, current color (0 <= icol1 <= ncol1)
00096  * ncol1      PLINT  Number of colors allocated in color map 1.
00097  * ncol1cp    PLINT  Number of control points in cmap1 allocation (max PL_MAX_CMAP1CP)
00098  * lcol1cp    PLFLT  Locations of control points in cmap1 [0,1]
00099  * curcmap    PLINT  Current color map
00100  * curcolor   RGB[]  Current color
00101  * tmpcolor   RGB[]  Temporary color storage
00102  * cmap0      RGB[]  Color map 0: maximum of ncol0 RGB 8-bit values
00103  * cmap1      RGB[]  Color map 1: maximum of ncol1 RGB 8-bit values
00104  *
00105  ***************************************************************************
00106  *
00107  * Variables governing pen width
00108  *
00109  * width      Current pen width
00110  * widthset   Set if pen width was specified
00111  * widthlock  Set if pen width is locked
00112  *
00113  ***************************************************************************
00114  *
00115  * Variables used to pass information between the core and the driver
00116  *
00117  * It would be nice to use the "dev_" prefix uniformly but changing
00118  * all that old code would be quite a lot of work..
00119  *
00120  * device     PLINT  Graphics device id number
00121  * dev_minor  PLINT  Minor device id (for variations on one type)
00122  * color      PLINT  Set if color is available
00123  * colorset   PLINT  Set if "color" was set prior to calling plinit
00124  * plbuf_read PLINT  Set during a plot buffer redraw
00125  * plbuf_write       PLINT  Set if driver needs to use the plot buffer
00126  * dev_fill0  PLINT  Set if driver can do solid area fills
00127  * dev_text   PLINT  Set if driver want to do it's only text drawing
00128  * dev_fill1  PLINT  Set if driver can do pattern area fills
00129  * dev_dash     PLINT   Set if driver can do dashed lines
00130  * dev_di     PLINT  Set if driver wants to handle DI commands
00131  * dev_flush  PLINT  Set if driver wants to handle flushes itself
00132  * dev_swin   PLINT  Set if driver wants to handle 'set window' commands
00133  * dev_fastimg  PLINT   Set if driver has fast image drawing capabilities
00134  * dev_xor      PLINT   Set if driver supports xor mode.
00135  * dev_clear    PLINT   Set if driver support clear.
00136  * termin     PLINT  Set for interactive devices
00137  * graphx     PLINT  Set if currently in graphics mode
00138  * nopause    PLINT  Set if we are skipping the pause between frames
00139  * family     PLINT  Set if familying is enabled
00140  * member     PLINT  Number of current family member file open
00141  * finc              PLINT  Number to increment between member files
00142  * fflen      PLINT  Minimum field length to use in member file number
00143  * bytemax    PLINT  Number of bytes maximum per member file
00144  * famadv     PLINT  Set to advance to the next family member
00145  * DevName    char*  Device name
00146  * OutFile    FILE   Output file pointer
00147  * BaseName   char*  Output base name (i.e. family)
00148  * FileName   char*  Output file name
00149  * output_type       int    0 for file, 1 for stream
00150  * bytecnt    PLINT  Byte count for output stream
00151  * page              PLINT  Page count for output stream
00152  * linepos    PLINT  Line count for output stream
00153  * pdfs              PDFstrm* PDF stream pointer
00154  *
00155  * These are used by the escape function (for area fill, etc).
00156  *
00157  * dev_npts   PLINT  Number of points we are plotting
00158  * dev_x      short* Pointer to array of x values
00159  * dev_y      short* Pointer to array of x values
00160  *
00161  * For images
00162  * dev_nptsX  PLINT  Number of points we are plotting in X
00163  * dev_nptsY  PLINT  Number of points we are plotting in Y
00164  * dev_z      ushort*       Pointer to array of z values for the color
00165  * dev_zmin,
00166  * dev_zmax     ushort  Min and max values of z to plot
00167  *
00168  * The following pointer is for drivers that require device-specific
00169  * data.  At initialization the driver should malloc the necessary
00170  * space and set pls->dev to point to this area.  This way there can
00171  * be multiple streams using the same driver without conflict.
00172  *
00173  * dev        void*  pointer to device-specific data (malloc'ed)
00174  *
00175  * User-supplied event handlers for use by interactive drivers (e.g. X).
00176  * Can be used to take various actions depending on input.  Currently
00177  * only a keyboard event handler is supported.
00178  *
00179  * KeyEH      void*  Keyboard event handler
00180  * KeyEH_data void*  Pointer to client data to pass
00181  *
00182  * ButtonEH   void*  (Mouse) Button event handler
00183  * ButtonEH_data void*      Pointer to client data to pass
00184  *
00185  * bop_handler       void*  bop handler
00186  * bop_data   void*  Pointer to client data to pass
00187  *
00188  * eop_handler       void*  eop handler
00189  * eop_data   void*  Pointer to client data to pass
00190  *
00191  * Variables used for direct specification of device characteristics
00192  * Not supported by all drivers (or even very many)
00193  *
00194  * xdpi..     PLFLT  Device DPI settings in x and y
00195  * xlength..  PLINT  Device output lengths in x and y
00196  * xoffset..  PLINT  Device offsets from upper left hand corner
00197  * pageset    PLINT  Set if page dimensions were specified
00198  * hack              PLINT  Enables driver-specific hack(s) if set
00199  *
00200  ***************************************************************************
00201  *
00202  * User customization tidy routine.  This is called before closing a stream
00203  * to do any program specific cleanup.
00204  *
00205  * tidy              void*   pointer to cleanup routine
00206  * tidy_data  void*   pointer to client data to pass
00207  *
00208  ****************************************************************************
00209  *
00210  * User error control variables.  Pass in a pointer for either to be set
00211  * in exceptional conditions.  The caller is responsible for clearing the
00212  * error code.
00213  *
00214  * errcode    PLINT* pointer to variable to assign error code
00215  * errmsg     char*  pointer to error message buffer (must be >= 160 bytes)
00216  *
00217  ****************************************************************************
00218  *
00219  * Stuff used by Xlib driver
00220  *
00221  * geometry   char*  Window geometry (malloc'ed)
00222  * window_id  long   X-window window ID
00223  * nopixmap   int    Set if you want to forbid allocation of pixmaps
00224  * db         int    Set if you want to double buffer output
00225  *                   (only pixmap is drawn to directly; it is blitted
00226  *                   to output window on EOP or an Expose)
00227  ***************************************************************************
00228  *
00229  * These are for support of the TK driver.
00230  *
00231  * server_name       char*  Main window name of server
00232  * server_host       char*  Name of host to run server on
00233  * server_port       char*  Port to talk to server on
00234  * user              char*  Your user name on remote host (for remsh command)
00235  * plserver   char*  Name of server
00236  * plwindow   char*  Name of reference server window (malloc'ed)
00237  * tcl_cmd    char*  TCL command(s) to eval on startup
00238  * tk_file    char*   File for plserver use with its -file option
00239  * auto_path  char*  Additional directories to autoload
00240  * bufmax     int    Number of bytes sent before output buffer is flushed
00241  * dp         int    Use Tcl-DP for communication, if set
00242  * server_nokill int Don't kill plserver on a ^C if set
00243  *
00244  ***************************************************************************
00245  *
00246  * Variables for use by the plot buffer
00247  *
00248  * plbufFile  FILE   Plot buffer file pointer
00249  * plbufOwner int    Typically set; only zero if current stream is cloned.
00250  *
00251  ***************************************************************************
00252  *
00253  * Driver interface (DI)
00254  *
00255  * difilt     PLINT  Driver interface filter flag
00256  *
00257  * dipxmin    PLFLT
00258  * dipymin    PLFLT  Min, max relative plot coordinates
00259  * dipxmax    PLFLT
00260  * dipymax    PLFLT
00261  * dipxax     PLFLT  Plot window transformation:
00262  * dipxb      PLFLT    x' = dipxax * x + dipxb
00263  * dipyay     PLFLT
00264  * dipyb      PLFLT    y' = dipyay * y + dipyb
00265  *
00266  * aspdev     PLFLT  Original device aspect ratio
00267  * aspect     PLFLT  Page aspect ratio
00268  * aspori     PLFLT  Rotation-induced aspect ratio
00269  * caspfactor PLFLT  Factor applied to preserve character aspect ratio
00270  * freeaspect PLINT  Allow aspect ratio to adjust to orientation swaps
00271  *                   when overall aspect ratio is changed.
00272  * portrait   PLINT  Portrait mode (orientation and aspect ratio)
00273  * mar        PLFLT  Page margin (minimum)
00274  * jx         PLFLT  Page justification in x
00275  * jy         PLFLT  Page justification in y
00276  *
00277  * didxax     PLFLT  Device window transformation:
00278  * didxb      PLFLT    x' = didxax * x + didxb
00279  * didyay     PLFLT
00280  * didyb      PLFLT    y' = didyay * y + didyb
00281  *
00282  * diclpxmi   PLINT
00283  * diclpxma   PLINT  Device clip limits
00284  * diclpymi   PLINT
00285  * diclpyma   PLINT
00286  *
00287  * diorot     PLFLT  Rotation angle (in units of pi/2)
00288  * dioxax     PLFLT  Orientation transformation:
00289  * dioxay     PLFLT    x' = dioxax * x + dioxay * y + dioxb
00290  * dioxb      PLFLT
00291  * dioyax     PLFLT    y' = dioyax * x + dioyay * y + dioyb
00292  * dioyay     PLFLT
00293  * dioyb      PLFLT
00294  *
00295  * dimxmin    PLFLT
00296  * dimymin    PLFLT  Target coordinate system parameters.
00297  * dimxmax    PLFLT
00298  * dimymax    PLFLT
00299  * dimxpmm    PLFLT
00300  * dimypmm    PLFLT
00301  * dimxax     PLFLT  Map meta to physical coordinates:
00302  * dimxb      PLFLT    x' = dimxax * x + dimxb
00303  * dimyay     PLFLT
00304  * dimyb      PLFLT    y' = dimyay * y + dimyb
00305  *
00306  * page_status       PLINT  Flag to indicate current action
00307  *
00308  ***************************************************************************
00309  *
00310  * Fill pattern state information.
00311  * patt < 0: Hardware fill, if available (not implemented yet)
00312  * patt ==0: Hardware fill, if available, solid
00313  * patt > 0: Software fill
00314  *
00315  * patt              Fill pattern number
00316  * inclin     Array of inclinations in tenths of degree for fill lines
00317  * delta      Array of spacings in micrometers between fill lines
00318  * nps        Number of distinct line styles for fills
00319  *
00320  ***************************************************************************
00321  *
00322  * Variables used in line drawing
00323  *
00324  * currx      Physical x-coordinate of current point
00325  * curry      Physical y-coordinate of current point
00326  * mark              Array of mark lengths in micrometers for broken lines
00327  * space      Array of space lengths in micrometers for broken lines
00328  * nms        Number of elements for current broken line style
00329  * timecnt    Timer for broken lines
00330  * alarm      Alarm indicating change of broken line status
00331  * pendn      Flag indicating if pen is up or down
00332  * curel      Current element within broken line
00333  *
00334  ***************************************************************************
00335  *
00336  * Variables governing character strings
00337  *
00338  * esc        Text string escape character
00339  *
00340  ***************************************************************************
00341  *
00342  * Scale factors for characters, symbols, and tick marks.
00343  *
00344  * scale      Scaling factor for chr, sym, maj, min.
00345  * chr...     Character default height and current (scaled) height
00346  * sym...     Symbol    default height and current (scaled) height
00347  * maj...     Major tick default height and current (scaled) height
00348  * min...     Minor tick default height and current (scaled) height
00349  *
00350  ***************************************************************************
00351  *
00352  * Variables governing numeric axis label appearance
00353  *
00354  * setpre     Non-zero to set precision using "prec"
00355  * precis     User-specified precision
00356  * xdigmax..  Allowed #digits in axes labels
00357  * xdigits..  Actual field widths (returned)
00358  *
00359  ***************************************************************************
00360  *
00361  * Variables governing physical coordinate system
00362  *
00363  * vpp..      Viewport boundaries in physical coordinates
00364  * spp..      Subpage  boundaries in physical coordinates
00365  * clp..      Clip     boundaries in physical coordinates
00366  * phy...     Physical device limits in physical coordinates
00367  * um.        Number of micrometers in a pixel
00368  * pmm        Number of pixels to a millimeter
00369  *
00370  ***************************************************************************
00371  *
00372  * State variables for 3d plots
00373  *
00374  * base3.     World coordinate size of base for 3-d plot
00375  * basec.     Position of centre of base for 3-d plot
00376  * dom...     Minimum and maximum values for domain
00377  * zzscl      Vertical (z) scale for 3-d plot
00378  * ran..      Minimum and maximum z values for 3-d plot
00379  * c..        Coordinate transformation from 3-d to 2-d
00380  *
00381  ***************************************************************************
00382  *
00383  * Variables for keeping track of world coordinate windows on a page.
00384  *
00385  * nCWindows  Number of coordinate windows on current page
00386  * windows    Array of plCWindow's for current page
00387  *
00388  ***************************************************************************
00389  *
00390  * Variables governing subpages and viewports.
00391  *
00392  * nsub...    Number of subpages on physical device
00393  * cursub     Current subpage
00394  * spd...     Subpage  boundaries in normalized device coordinates
00395  * vpd...     Viewport boundaries in normalized device coordinates
00396  * vpw...     Viewport boundaries in world coordinates
00397  *
00398  ***************************************************************************
00399  *
00400  * Transformation variables
00401  *
00402  * wp....     Transformation variables for world  to physical conversion
00403  * wm....     Transformation variables for world coordinates to mm
00404  *
00405  ****************************************************************************
00406  *
00407  * Other variables
00408  *
00409  * dev_compression Compression level for supporting devices
00410  *
00411  ****************************************************************************
00412  *
00413  * Font related variables
00414  *
00415  * cfont           Current font number, replaces global 'font' in plsym.c
00416  *                 This can be latter extended for font shape, series, family and size
00417  *
00418 \*--------------------------------------------------------------------------*/
00419 
00420 #define PL_MAX_CMAP1CP 256
00421 
00422 typedef struct {
00423 
00424 /* Misc control information */
00425 
00426     PLINT ipls, level, verbose, debug, initialized, dev_initialized;
00427     char *program;
00428 
00429 /* Colormaps */
00430 
00431     PLINT icol0, ncol0, icol1, ncol1, ncp1, curcmap;
00432 
00433     PLColor curcolor, tmpcolor;
00434     PLColor *cmap0;
00435     PLColor *cmap1;
00436 
00437     PLControlPt cmap1cp[PL_MAX_CMAP1CP];
00438 
00439 /* Variables governing pen width */
00440 
00441     PLINT width;
00442     PLINT widthset, widthlock;
00443 
00444 /* Driver dispatch table, obsoletes "device" member below. */
00445 
00446     PLDispatchTable *dispatch_table;
00447 
00448 /* Variables used for interacting with or by device driver */
00449 
00450     PLINT plbuf_read, plbuf_write;
00451     PLINT device, dev_minor, termin, graphx, nopause;
00452     PLINT color, colorset;
00453     PLINT family, member, finc, fflen, bytemax, famadv;
00454     PLINT dev_fill0, dev_fill1, dev_dash, dev_di, dev_flush, dev_swin;
00455     PLINT dev_text, dev_xor, dev_clear, dev_fastimg;
00456 
00457     char DevName[80];
00458     FILE *OutFile;
00459     char *BaseName, *FileName;
00460     int  output_type;
00461     PLINT bytecnt, page, linepos;
00462     PDFstrm *pdfs;
00463 
00464     PLINT dev_npts;
00465     short *dev_x, *dev_y;
00466 
00467   /* variables for plimage() */
00468 
00469     PLINT dev_nptsX, dev_nptsY;
00470     short *dev_ix, *dev_iy;
00471     unsigned short *dev_z;
00472     unsigned short dev_zmin, dev_zmax;
00473     PLINT imclxmin, imclxmax, imclymin, imclymax;
00474 
00475   /* end of variables for plimage() */
00476 
00477     void *dev;
00478 
00479     void (*KeyEH)    (PLGraphicsIn *gin, void *KeyEH_data,
00480                       int *exit_eventloop);
00481     void *KeyEH_data;
00482 
00483     void (*ButtonEH) (PLGraphicsIn *gin, void *ButtonEH_data,
00484                       int *exit_eventloop);
00485     void *ButtonEH_data;
00486 
00487     void (*LocateEH) (PLGraphicsIn *gin, void *LocateEH_data,
00488                       int *locate_mode);
00489     void *LocateEH_data;
00490 
00491     void (*bop_handler)     (void *bop_data, int *skip_driver_bop);
00492     void *bop_data;
00493 
00494     void (*eop_handler)     (void *eop_data, int *skip_driver_eop);
00495     void *eop_data;
00496 
00497     PLFLT xdpi, ydpi;
00498     PLINT xlength, ylength;
00499     PLINT xoffset, yoffset;
00500     PLINT pageset, hack;
00501 
00502 /* Per stream tidy function. */
00503 
00504     void (*tidy)    (void *);
00505     void *tidy_data;
00506 
00507 /* Error info */
00508 
00509     PLINT *errcode;
00510     char *errmsg;
00511 
00512 /* Stuff used by Xlib driver */
00513 
00514     char *geometry;
00515     long window_id;
00516     int  nopixmap, db;
00517 
00518 /* Stuff used by TK, DP drivers */
00519 
00520     char *server_name, *server_host, *server_port, *user;
00521     char *plserver, *plwindow;
00522     char *tcl_cmd, *auto_path;
00523     char *tk_file;  /* plserver -file option */
00524     int  bufmax, dp, server_nokill;
00525 
00526 /* Plot buffer settings */
00527 
00528     FILE *plbufFile;
00529     int  plbufOwner;
00530 
00531 /* Driver interface (DI) */
00532 
00533     PLINT difilt, diclpxmi, diclpxma, diclpymi, diclpyma;
00534     PLFLT dipxmin, dipymin, dipxmax, dipymax;
00535     PLFLT dipxax, dipxb, dipyay, dipyb;
00536     PLFLT aspdev, aspect, aspori, caspfactor, mar, jx, jy;
00537     PLFLT didxax, didxb, didyay, didyb;
00538     PLFLT diorot;
00539     PLFLT dioxax, dioxay, dioxb, dioyax, dioyay, dioyb;
00540     PLFLT dimxax, dimxb, dimyay, dimyb;
00541     PLFLT dimxmin, dimymin, dimxmax, dimymax, dimxpmm, dimypmm;
00542     PLINT page_status, freeaspect, portrait;
00543 
00544 /* Fill pattern info */
00545 
00546     PLINT patt, inclin[2], delta[2], nps;
00547 
00548 /* Variables used in line drawing */
00549 
00550     PLINT currx, curry;
00551     PLINT mark[10], space[10], nms;
00552     PLINT timecnt, alarm, pendn, curel;
00553 
00554 /* Variables governing character strings */
00555 
00556     char  esc;
00557 
00558 /* Scale factors for characters, symbols, and tick marks. */
00559 
00560     PLFLT scale;
00561     PLFLT chrdef, chrht;
00562     PLFLT symdef, symht;
00563     PLFLT majdef, majht;
00564     PLFLT mindef, minht;
00565 
00566 /* Variables governing numeric axis label appearance */
00567 
00568     PLINT setpre, precis;
00569     PLINT xdigmax, ydigmax, zdigmax;
00570     PLINT xdigits, ydigits, zdigits;
00571 
00572 /* Variables governing physical coordinate system */
00573 
00574     PLINT vppxmi, vppxma, vppymi, vppyma;
00575     PLINT sppxmi, sppxma, sppymi, sppyma;
00576     PLINT clpxmi, clpxma, clpymi, clpyma;
00577     PLINT phyxmi, phyxma, phyxlen, phyymi, phyyma, phyylen;
00578     PLINT umx, umy;
00579     PLFLT xpmm, ypmm;
00580 
00581 /* State variables for 3d plots */
00582 
00583     PLFLT base3x, base3y, basecx, basecy;
00584     PLFLT domxmi, domxma, domymi, domyma;
00585     PLFLT zzscl, ranmi, ranma;
00586     PLFLT cxx, cxy, cyx, cyy, cyz;
00587 
00588 /* Variables for keeping track of windows on a page. */
00589 
00590     int nplwin;
00591     PLWindow plwin[PL_MAXWINDOWS];
00592 
00593 /* Variables governing subpages and viewports. */
00594 
00595     PLINT nsubx, nsuby, cursub;
00596     PLFLT spdxmi, spdxma, spdymi, spdyma;
00597     PLFLT vpdxmi, vpdxma, vpdymi, vpdyma;
00598     PLFLT vpwxmi, vpwxma, vpwymi, vpwyma;
00599 
00600 /* Transformation variables */
00601 
00602     PLFLT wpxscl, wpxoff, wpyscl, wpyoff;
00603     PLFLT wmxscl, wmxoff, wmyscl, wmyoff;
00604     PLFLT wdxscl, wdxoff, wdyscl, wdyoff;
00605 
00606 /* Other variables */
00607 
00608   PLINT dev_compression;
00609   PLINT cfont;
00610   
00611   void *FT;
00612 
00613 /* Stuff used by the Tkwin driver for Plframe */
00614   struct PlPlotter *plPlotterPtr;
00615 
00616 } PLStream;
00617 
00618 /*--------------------------------------------------------------------------*\
00619  * Prototypes for stream & device utility functions.
00620 \*--------------------------------------------------------------------------*/
00621 
00622 #ifdef __cplusplus
00623 extern "C" {
00624 #endif
00625 
00626 /* Get the current stream pointer */
00627 
00628 void
00629 plgpls(PLStream **p_pls);
00630 
00631 /* Initializes device cmap 1 entry by interpolation from pls->cmap1 entries */
00632 
00633 void
00634 plcol_interp(PLStream *pls, PLColor *newcolor, int i, int ncol);
00635 
00636 /* Opens file for output, prompting if not set. */
00637 
00638 void
00639 plOpenFile(PLStream *pls);
00640 
00641 /* Sets up next file member name (in pls->FileName), but does not open it. */
00642 
00643 void
00644 plP_getmember(PLStream *pls);
00645 
00646 /* Sets up file name & family stem name. */
00647 
00648 void
00649 plP_sfnam(PLStream *pls, const char *fnam);
00650 
00651 /* Initializes family file parameters. */
00652 
00653 void
00654 plFamInit(PLStream *pls);
00655 
00656 /* Starts new member file of family file set if necessary. */
00657 
00658 void
00659 plGetFam(PLStream *pls);
00660 
00661 /* Rotates physical coordinates if necessary for given orientation. */
00662 
00663 void
00664 plRotPhy(PLINT orient, PLINT xmin, PLINT ymin, PLINT xmax, PLINT ymax,
00665         int *px, int *py);
00666 
00667 /* Allocates a standard PLDev structure for device-specific data */
00668 
00669 PLDev *
00670 plAllocDev(PLStream *pls);
00671 
00672 /* Just fills in the PLGraphicsIn with appropriate initial values. */
00673 
00674 void
00675 plGinInit(PLGraphicsIn *gin);
00676 
00677 #ifdef __cplusplus
00678 }
00679 #endif
00680 
00681 #endif /* __PLSTRM_H__ */