Jspice3
Main Page
Data Structures
Files
File List
Globals
newgraf.h
Go to the documentation of this file.
1
/***************************************************************************
2
JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
3
Copyright 1990 Regents of the University of California. All rights reserved.
4
Authors: 1992 Stephen R. Whiteley
5
****************************************************************************/
6
7
/*
8
* Header for new graphics package.
9
*/
10
11
/* max number of displayed curves */
12
#define PNUM 8
13
14
/* number of characters in trace name field */
15
#define FIELD 12
16
17
/* option mask defines */
18
#define OPT_n 0x1
19
#define OPT_N 0x2
20
#define OPT_x 0x4
21
#define OPT_X 0x8
22
#define OPT_b 0x10
23
#define OPT_t 0x20
24
#define OPT_p 0x40
25
#define OPT_Xx 0x80
26
#define OPT_help 0x100
27
#define OPT_quit 0x200
28
#define OPT_mark 0x400
29
#define OPT_add 0x800
30
#define OPT_hcpy 0x1000
31
#define OPT_step 0x2000
32
33
/* type of trace: voltage, current, other */
34
#define GRAF_V 0
35
#define GRAF_I 1
36
#define GRAF_O 2
37
38
39
struct
gframe
{
40
double
beg
;
/* initial data value */
41
double
end
;
/* final data value */
42
double
min
;
/* scale initial value */
43
double
max
;
/* scale final value */
44
};
45
46
/* scale factors for plot */
47
struct
gscale
{
48
int
ncells
;
/* number of x axis cells */
49
int
numpts
;
/* number of x axis points to plot */
50
int
strtpt
;
/* starting x axis point offset */
51
int
lflg
;
/* nonzero if log x axis */
52
/*
53
* The following two arrays store min/max values used for
54
* building special y scales. The last four elements are
55
* the values for all traces (global min/max), just the "v"
56
* traces, just the "i" traces, and other traces. The
57
* first (up to PNUM elements) store min/max values derived
58
* from data for expanded (x option) plots.
59
*/
60
double
ymin[
PNUM
+4];
/* y scale min values: plots,all,v,i,other */
61
double
ymax[
PNUM
+4];
/* y scale max values: plots,all,v,i,other */
62
struct
gframe
xfull;
/* full x scale values */
63
struct
gframe
xcurr;
/* current x scale */
64
};
65
66
/* trace data */
67
struct
gtrace
{
68
int
cycles
;
/* cycles of multidimensional plot */
69
int
extra
;
/* extra points of incomplete multi plot */
70
char
name[
FIELD
+2];
/* name of trace */
71
int
type
;
/* GRAF_V, GRAF_I, GRAF_O */
72
double
scale[2];
/* default y scale for trace */
73
int
lasty
;
/* last point plotted (screen coord) */
74
float
*
data
;
/* interpolated data for trace */
75
};
76
77
/* viewport description */
78
struct
screen
{
79
int
X
;
/* plot viewport width */
80
int
Y
;
/* plot viewport height */
81
int
W
;
/* font width */
82
int
H
;
/* font height */
83
int
W2
;
/* half font width */
84
int
H2
;
/* half font height */
85
int
H3
;
/* vertical space and a half */
86
int
XL
;
/* left margin */
87
int
XU
;
/* right " */
88
int
YL
;
/* lower " */
89
int
YU
;
/* upper " */
90
int
XS
;
/* screen width */
91
int
YS
;
/* screen height */
92
int
XC
;
/* X center of plot area */
93
int
YC
;
/* Y center of plot area */
94
};
95
96
/* stored reference */
97
struct
gref
{
98
int
x
;
/* X reference */
99
bool
set
;
/* using offsets */
100
};
101
102
/* plot data storage */
103
struct
gplot
{
104
int
numtr
;
/* number of traces */
105
int
numpt
;
/* number of points in traces */
106
int
opt
;
/* option mask, see defines */
107
int
lastx
;
/* last x point (screen coords) */
108
bool
iniplot
;
/* set when doing iplot */
109
float
*
xdata
;
/* interpolated x scale data */
110
struct
gscale
*
scale
;
/* scaling parameters for x axis */
111
struct
plot
*
plot
;
/* originating plot structure */
112
struct
dvlist
*
dlist
;
/* list of dvecs being plotted, for iplot */
113
struct
gtrace
tdata[
PNUM
];
/* trace data */
114
struct
screen
scr;
/* viewport description */
115
struct
gref
ref;
/* storage of marker offset */
116
};
117
118
/*
119
* Structures for operating range analysis plotting.
120
*/
121
122
struct
chkpts
{
/* linked list of x-y file points to plot */
123
char
*
v1
;
/* value 1 steps (as int) */
124
char
*
v2
;
/* value 2 steps (as int) */
125
char
*
pf
;
/* boolean pass/file values */
126
char
delta1
;
/* number of steps 1 */
127
char
delta2
;
/* number of steps 2 */
128
int
size
;
/* length of list */
129
int
rsize
;
/* allocated length */
130
int
xc
;
/* screen center x */
131
int
yc
;
/* screen center y */
132
int
d
;
/* screen cell size */
133
int
d1
;
/* current step 1 */
134
int
d2
;
/* current step 2 */
135
double
minv1
;
/* min/max data values */
136
double
maxv1
;
137
double
minv2
;
138
double
maxv2
;
139
struct
chkpts
*
next
;
140
};
141
142
struct
mdata
{
143
struct
chkpts
*
pts
;
144
struct
screen
scr;
145
};
gplot::xdata
float * xdata
Definition:
newgraf.h:109
gref::x
int x
Definition:
newgraf.h:98
gscale::strtpt
int strtpt
Definition:
newgraf.h:50
chkpts::maxv2
double maxv2
Definition:
newgraf.h:138
gframe::end
double end
Definition:
newgraf.h:41
chkpts::minv2
double minv2
Definition:
newgraf.h:137
FIELD
#define FIELD
Definition:
newgraf.h:15
chkpts::minv1
double minv1
Definition:
newgraf.h:135
dvlist
Definition:
ftedata.h:49
PNUM
#define PNUM
Definition:
newgraf.h:12
gtrace::type
int type
Definition:
newgraf.h:71
gtrace::data
float * data
Definition:
newgraf.h:74
screen::YS
int YS
Definition:
newgraf.h:91
gframe::max
double max
Definition:
newgraf.h:43
plot
Definition:
ftedata.h:61
chkpts::v1
char * v1
Definition:
newgraf.h:123
gplot::numtr
int numtr
Definition:
newgraf.h:104
chkpts
Definition:
newgraf.h:122
gplot
Definition:
newgraf.h:103
chkpts::size
int size
Definition:
newgraf.h:128
gframe
Definition:
newgraf.h:39
gref
Definition:
newgraf.h:97
gscale::lflg
int lflg
Definition:
newgraf.h:51
gtrace::cycles
int cycles
Definition:
newgraf.h:68
gplot::numpt
int numpt
Definition:
newgraf.h:105
chkpts::rsize
int rsize
Definition:
newgraf.h:129
gplot::dlist
struct dvlist * dlist
Definition:
newgraf.h:112
gscale::numpts
int numpts
Definition:
newgraf.h:49
gplot::opt
int opt
Definition:
newgraf.h:106
screen::XU
int XU
Definition:
newgraf.h:87
gplot::scale
struct gscale * scale
Definition:
newgraf.h:110
screen::H3
int H3
Definition:
newgraf.h:85
mdata
Definition:
newgraf.h:142
screen::W
int W
Definition:
newgraf.h:81
gplot::plot
struct plot * plot
Definition:
newgraf.h:111
gscale::ncells
int ncells
Definition:
newgraf.h:48
gplot::iniplot
bool iniplot
Definition:
newgraf.h:108
chkpts::next
struct chkpts * next
Definition:
newgraf.h:139
chkpts::yc
int yc
Definition:
newgraf.h:131
screen::H
int H
Definition:
newgraf.h:82
screen::YU
int YU
Definition:
newgraf.h:89
screen::X
int X
Definition:
newgraf.h:79
gtrace::lasty
int lasty
Definition:
newgraf.h:73
chkpts::pf
char * pf
Definition:
newgraf.h:125
screen::YL
int YL
Definition:
newgraf.h:88
chkpts::v2
char * v2
Definition:
newgraf.h:124
gplot::lastx
int lastx
Definition:
newgraf.h:107
screen::XL
int XL
Definition:
newgraf.h:86
chkpts::maxv1
double maxv1
Definition:
newgraf.h:136
gframe::min
double min
Definition:
newgraf.h:42
screen::YC
int YC
Definition:
newgraf.h:93
chkpts::d1
int d1
Definition:
newgraf.h:133
chkpts::delta1
char delta1
Definition:
newgraf.h:126
chkpts::d
int d
Definition:
newgraf.h:132
mdata::pts
struct chkpts * pts
Definition:
newgraf.h:143
gscale
Definition:
newgraf.h:47
gtrace::extra
int extra
Definition:
newgraf.h:69
screen::W2
int W2
Definition:
newgraf.h:83
chkpts::delta2
char delta2
Definition:
newgraf.h:127
screen::H2
int H2
Definition:
newgraf.h:84
screen::Y
int Y
Definition:
newgraf.h:80
gtrace
Definition:
newgraf.h:67
gframe::beg
double beg
Definition:
newgraf.h:40
chkpts::d2
int d2
Definition:
newgraf.h:134
chkpts::xc
int xc
Definition:
newgraf.h:130
screen
Definition:
newgraf.h:78
screen::XS
int XS
Definition:
newgraf.h:90
screen::XC
int XC
Definition:
newgraf.h:92
src
include
newgraf.h
Generated by
1.8.11