1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
/* This file defines the initialization for any TekPlotter object,
including both private data and public methods. There is a one-to-one
correspondence between public methods and user-callable functions in the
C API. */
#include "sys-defines.h"
#include "plot.h"
#include "extern.h"
/* Note that Tektronix displays are rectangular, and wider than they are
high: the aspect ratio is approximately 4:3. In terms of integer
Tektronix coordinates the Tektronix display is a [0..4095]x[0..3119]
rectangle, and we choose our graphics display to be the square
[488..3607]x[0..3119]. I.e. we define it to be a square, occupying the
entire height of the display, and centered on the display. */
Plotter _tek_default_plotter =
{
/* methods */
_g_alabel, _g_arc, _g_arcrel, _g_box, _g_boxrel, _g_capmod, _g_circle, _g_circlerel, _t_closepl, _g_color, _g_colorname, _g_cont, _g_contrel, _g_ellarc, _g_ellarcrel, _g_ellipse, _g_ellipserel, _g_endpath, _t_erase, _g_farc, _g_farcrel, _g_fbox, _g_fboxrel, _g_fcircle, _g_fcirclerel, _g_fconcat, _t_fcont, _g_fcontrel, _g_fellarc, _g_fellarcrel, _g_fellipse, _g_fellipserel, _g_ffontname, _g_ffontsize, _g_fillcolor, _g_fillcolorname, _g_filltype, _g_flabelwidth, _g_fline, _g_flinerel, _g_flinewidth, _g_flushpl, _g_fmarker, _g_fmarkerrel, _g_fmove, _g_fmoverel, _g_fontname, _g_fontsize, _t_fpoint, _g_fpointrel, _g_frotate, _g_fscale, _g_fspace, _g_fspace2, _g_ftextangle, _g_ftranslate, _g_havecap, _g_joinmod, _g_label, _g_labelwidth, _g_line, _g_linemod, _g_linerel, _g_linewidth, _g_marker, _g_markerrel, _g_move, _g_moverel, _t_openpl, _g_outfile, _g_pencolor, _g_pencolorname, _g_point, _g_pointrel, _g_restorestate, _g_savestate, _g_space, _g_space2, _g_textangle,
/* internal methods that plot strings of various supported types */
NULL, NULL, NULL,
NULL, NULL, NULL,
/* private low-level `retrieve font' method */
_g_retrieve_font,
/* private low-level `sync font' method */
NULL,
/* private low-level `sync line attributes' method */
_t_set_attributes,
/* private low-level `sync color' methods */
_t_set_pen_color,
NULL,
/* private low-level `sync position' method */
NULL,
/* error handlers */
_g_warning,
_g_error,
/* basic plotter parameters */
PL_TEK, /* plotter type */
false, /* open? */
false, /* opened? */
(FILE *)NULL, /* input stream (if any) */
(FILE *)NULL, /* output stream (if any) */
(FILE *)NULL, /* error stream (if any) */
/* device driver parameters (see g_params.h) */
{ NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL },
/* capabilities */
0, 0, 1, 0, 0, 0, /* capability flags (see extern.h) */
MAXINT, /* hard polyline length limit */
/* output buffer */
{NULL, 0, NULL, 0}, /* output buffer (for non-realtime devices) */
/* associated process id's */
NULL, /* list of pids of forked-off processes */
0, /* number of pids in list */
/* drawing state(s) */
(State *)NULL, /* pointer to top of drawing state stack */
&_tek_default_drawstate, /* for initialization and resetting */
/* dimensions */
true, /* bitmap display device? */
488, 3607, 0, 3119, /* range of coordinates (for a bitmap device)*/
{0.0, 0.0, 0.0, 0.0, 0.0}, /* same, for a physical device (in inches) */
0.0, /* units/inch for a physical device */
false, /* y increases downward? */
/* elements used by more than one device */
MAX_UNFILLED_POLYLINE_LENGTH, /* user-settable, for unfilled polylines */
true, /* position is unknown? */
{0, 0}, /* cursor position (for a bitmap device) */
false, /* issued warning on lack of sheared fonts */
/* elements specific to the metafile device driver */
0, /* 0/1, i.e. binary/portable output format */
/* elements specific to the Tektronix device driver */
D_GENERIC, /* which sort of Tektronix? */
MODE_ALPHA, /* one of MODE_* */
L_SOLID, /* one of L_* */
true, /* mode is unknown? */
true, /* line type is unknown? */
ANSI_SYS_GRAY30, /* MS-DOS kermit's fg color */
ANSI_SYS_WHITE, /* MS-DOS kermit's bg color */
/* elements specific to the HP-GL device driver */
2, /* version, 0=HP-GL, 1=HP7550A, 2=HP-GL/2 */
0, /* HP-GL rotation angle */
0.0, 8128.0, /* scaling point P1 in native HP-GL coors */
0.0, 8128.0, /* scaling point P2 in native HP-GL coors */
10668.0, /* plot length (for HP-GL/2 roll plotters) */
1, /* current pen (initted in closepl.c) */
false, /* pen down rather than up? */
0.001, /* pen width (frac of diag dist betw P1,P2) */
HPGL_L_SOLID, /* line type */
HPGL_CAP_BUTT, /* cap style for lines */
HPGL_JOIN_MITER, /* join style for lines */
HPGL_FILL_SOLID_BI, /* fill type */
0.0, /* percent shading (used if FILL_SHADING) */
false, /* monochrome, i.e. have pen #1 only? */
2, /* pen to be assigned a color next */
false, /* can construct a palette? (HP-GL/2 only) */
true, /* white pen sh'd be opaque? (HP-GL/2 only) */
PCL_ROMAN_8, /* encoding, 14=ISO-Latin-1,.. (HP-GL/2 only)*/
0, /* font spacing, 0=fixed, 1=not(HP-GL/2 only)*/
0, /* posture, 0=upright, 1=italic(HP-GL/2 only)*/
0, /* weight,0=normal,3=bold, etc.(HP-GL/2 only)*/
STICK_TYPEFACE, /* typeface, as in g_fontdb.c (HP-GL/2 only) */
0, /* char. ht., % of p2y-p1y (HP-GL/2 only) */
0, /* char. width, % of p2x-p1x (HP-GL/2 only) */
0, /* label rise, % of p2y-p1y (HP-GL/2 only) */
0, /* label run, % of p2x-p1x (HP-GL/2 only) */
0, /* tangent of character slant (HP-GL/2 only)*/
(unsigned char)3, /* character used as label terminator (same) */
/* elements specific to the fig device driver */
false, /* whether xfig display should be in metric */
FIG_INITIAL_DEPTH, /* fig's current value for `depth' attribute */
0, /* drawing priority for last-drawn object */
0, /* number of colors currently defined */
/* elements specific to the Postscript/idraw device driver */
0.0, 0.0, 0.0, 0.0, /* bounding box elements (dummies) */
#ifndef X_DISPLAY_MISSING
/* elements specific to the X11 and X11 Drawable device drivers */
(Drawable)NULL, /* an X drawable (e.g. a window) */
(Drawable)NULL, /* an X drawable (e.g. a pixmap) */
(Fontrecord *)NULL, /* head of list of retrieved X fonts */
(Display *)NULL, /* display */
(Colormap)NULL, /* colormap */
/* elements specific to the X11 device driver */
(XtAppContext)NULL, /* application context */
(Widget)NULL, /* toplevel widget */
(Widget)NULL, /* Label widget */
false, /* window(s) disappear on Plotter deletion? */
#endif /* X_DISPLAY_MISSING */
/* Long arrays are positioned at the end, and are not initialized */
/* HP-GL driver: pen_color[] and pen_defined[] arrays */
/* FIG: fig_usercolors[] array */
/* PS: ps_font_used[] array */
};
|