PLplot
5.15.0
Toggle main menu visibility
Loading...
Searching...
No Matches
null.c
Go to the documentation of this file.
1
// PLplot Null device driver.
2
//
3
#include "
plDevs.h
"
4
5
#ifdef PLD_null
6
7
#include "
plplotP.h
"
8
#include "
drivers.h
"
9
10
// Device info
11
PLDLLIMPEXP_DRIVER
const
char
* plD_DEVICE_INFO_null =
"null:Null device:-1:null:42:null\n"
;
12
13
void
plD_dispatch_init_null
(
PLDispatchTable
*pdt );
14
15
void
plD_init_null(
PLStream
* );
16
void
plD_line_null(
PLStream
*,
short
,
short
,
short
,
short
);
17
void
plD_polyline_null(
PLStream
*,
short
*,
short
*,
PLINT
);
18
void
plD_eop_null(
PLStream
* );
19
void
plD_bop_null(
PLStream
* );
20
void
plD_tidy_null(
PLStream
* );
21
void
plD_state_null(
PLStream
*,
PLINT
);
22
void
plD_esc_null(
PLStream
*,
PLINT
,
void
* );
23
24
void
plD_dispatch_init_null
(
PLDispatchTable
*pdt )
25
{
26
#ifndef ENABLE_DYNDRIVERS
27
pdt->
pl_MenuStr
=
"Null device"
;
28
pdt->
pl_DevName
=
"null"
;
29
#endif
30
pdt->
pl_type
=
plDevType_Null
;
31
pdt->
pl_seq
= 42;
32
pdt->
pl_init
= (
plD_init_fp
) plD_init_null;
33
pdt->
pl_line
= (
plD_line_fp
) plD_line_null;
34
pdt->
pl_polyline
= (
plD_polyline_fp
) plD_polyline_null;
35
pdt->
pl_eop
= (
plD_eop_fp
) plD_eop_null;
36
pdt->
pl_bop
= (
plD_bop_fp
) plD_bop_null;
37
pdt->
pl_tidy
= (
plD_tidy_fp
) plD_tidy_null;
38
pdt->
pl_state
= (
plD_state_fp
) plD_state_null;
39
pdt->
pl_esc
= (
plD_esc_fp
) plD_esc_null;
40
}
41
42
//--------------------------------------------------------------------------
43
// plD_init_null()
44
//
45
// Initialize device (terminal).
46
//--------------------------------------------------------------------------
47
48
void
49
plD_init_null(
PLStream
*
PL_UNUSED
(
pls
) )
50
{
51
int
xmin = 0;
52
int
xmax =
PIXELS_X
- 1;
53
int
ymin = 0;
54
int
ymax =
PIXELS_Y
- 1;
55
56
PLFLT
pxlx = (double)
PIXELS_X
/ (
double
)
LPAGE_X
;
57
PLFLT
pxly = (double)
PIXELS_Y
/ (
double
)
LPAGE_Y
;
58
59
// Set up device parameters
60
61
plP_setpxl
( pxlx, pxly );
62
plP_setphy
( xmin, xmax, ymin, ymax );
63
}
64
65
//--------------------------------------------------------------------------
66
// The remaining driver functions are all null.
67
//--------------------------------------------------------------------------
68
69
void
70
plD_line_null(
PLStream
*
PL_UNUSED
(
pls
),
short
PL_UNUSED
( x1a ),
short
PL_UNUSED
( y1a ),
short
PL_UNUSED
( x2a ),
short
PL_UNUSED
( y2a ) )
71
{
72
}
73
74
void
75
plD_polyline_null(
PLStream
*
PL_UNUSED
(
pls
),
short
*
PL_UNUSED
( xa ),
short
*
PL_UNUSED
( ya ),
PLINT
PL_UNUSED
( npts ) )
76
{
77
}
78
79
void
80
plD_eop_null(
PLStream
*
PL_UNUSED
(
pls
) )
81
{
82
}
83
84
void
85
plD_bop_null(
PLStream
*
PL_UNUSED
(
pls
) )
86
{
87
}
88
89
void
90
plD_tidy_null(
PLStream
*
PL_UNUSED
(
pls
) )
91
{
92
}
93
94
void
95
plD_state_null(
PLStream
*
PL_UNUSED
(
pls
),
PLINT
PL_UNUSED
( op ) )
96
{
97
}
98
99
void
100
plD_esc_null(
PLStream
*
PL_UNUSED
(
pls
),
PLINT
PL_UNUSED
( op ),
void
*
PL_UNUSED
( ptr ) )
101
{
102
}
103
104
#else
105
int
106
pldummy_null
()
107
{
108
return
0;
109
}
110
111
#endif
// PLD_nulldev
plDevType_Null
@ plDevType_Null
Definition
disptab.h:15
plD_line_fp
void(* plD_line_fp)(struct PLStream_struct *, short, short, short, short)
Definition
disptab.h:68
plD_tidy_fp
void(* plD_tidy_fp)(struct PLStream_struct *)
Definition
disptab.h:72
plD_bop_fp
void(* plD_bop_fp)(struct PLStream_struct *)
Definition
disptab.h:71
plD_state_fp
void(* plD_state_fp)(struct PLStream_struct *, PLINT)
Definition
disptab.h:73
plD_eop_fp
void(* plD_eop_fp)(struct PLStream_struct *)
Definition
disptab.h:70
plD_init_fp
void(* plD_init_fp)(struct PLStream_struct *)
Definition
disptab.h:67
plD_esc_fp
void(* plD_esc_fp)(struct PLStream_struct *, PLINT, void *)
Definition
disptab.h:74
plD_polyline_fp
void(* plD_polyline_fp)(struct PLStream_struct *, short *, short *, PLINT)
Definition
disptab.h:69
drivers.h
plD_dispatch_init_null
PLDLLIMPEXP_DRIVER void plD_dispatch_init_null(PLDispatchTable *pdt)
pldummy_null
int pldummy_null()
Definition
null.c:106
plDevs.h
plP_setpxl
void plP_setpxl(PLFLT xpmm, PLFLT ypmm)
Definition
plcore.c:4238
plP_setphy
void plP_setphy(PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax)
Definition
plcore.c:4249
pls
static PLStream * pls[PL_NSTREAMS]
Definition
plcore.h:88
PLDLLIMPEXP_DRIVER
#define PLDLLIMPEXP_DRIVER
Definition
pldll.h:81
plplotP.h
LPAGE_X
#define LPAGE_X
Definition
plplotP.h:308
PIXELS_X
#define PIXELS_X
Definition
plplotP.h:304
LPAGE_Y
#define LPAGE_Y
Definition
plplotP.h:309
PIXELS_Y
#define PIXELS_Y
Definition
plplotP.h:305
PLFLT
float PLFLT
Definition
plplot.h:163
PL_UNUSED
#define PL_UNUSED(x)
Definition
plplot.h:138
PLINT
int PLINT
Definition
plplot.h:181
PLDispatchTable
Definition
disptab.h:78
PLDispatchTable::pl_seq
int pl_seq
Definition
disptab.h:82
PLDispatchTable::pl_eop
plD_eop_fp pl_eop
Definition
disptab.h:86
PLDispatchTable::pl_DevName
const char * pl_DevName
Definition
disptab.h:80
PLDispatchTable::pl_type
int pl_type
Definition
disptab.h:81
PLDispatchTable::pl_esc
plD_esc_fp pl_esc
Definition
disptab.h:90
PLDispatchTable::pl_polyline
plD_polyline_fp pl_polyline
Definition
disptab.h:85
PLDispatchTable::pl_state
plD_state_fp pl_state
Definition
disptab.h:89
PLDispatchTable::pl_tidy
plD_tidy_fp pl_tidy
Definition
disptab.h:88
PLDispatchTable::pl_line
plD_line_fp pl_line
Definition
disptab.h:84
PLDispatchTable::pl_init
plD_init_fp pl_init
Definition
disptab.h:83
PLDispatchTable::pl_bop
plD_bop_fp pl_bop
Definition
disptab.h:87
PLDispatchTable::pl_MenuStr
const char * pl_MenuStr
Definition
disptab.h:79
PLStream
Definition
plstrm.h:524
drivers
null.c
Generated on
for PLplot by
1.17.0