PLplot
5.11.0
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
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
plplot_source
drivers
null.c
Generated on Sun Apr 12 2015 03:08:35 for PLplot by
1.8.1.2