PLplot
5.9.9
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
// $Id: null.c 12008 2011-10-28 12:50:46Z andrewross $
2
//
3
// PLplot Null device driver.
4
//
5
#include "
plDevs.h
"
6
7
#ifdef PLD_null
8
9
#include "
plplotP.h
"
10
#include "
drivers.h
"
11
12
// Device info
13
PLDLLIMPEXP_DRIVER
const
char
* plD_DEVICE_INFO_null =
"null:Null device:-1:null:42:null\n"
;
14
15
void
plD_dispatch_init_null
(
PLDispatchTable
*pdt );
16
17
void
plD_init_null(
PLStream
* );
18
void
plD_line_null(
PLStream
*,
short
,
short
,
short
,
short
);
19
void
plD_polyline_null(
PLStream
*,
short
*,
short
*,
PLINT
);
20
void
plD_eop_null(
PLStream
* );
21
void
plD_bop_null(
PLStream
* );
22
void
plD_tidy_null(
PLStream
* );
23
void
plD_state_null(
PLStream
*,
PLINT
);
24
void
plD_esc_null(
PLStream
*,
PLINT
,
void
* );
25
26
void
plD_dispatch_init_null
(
PLDispatchTable
*pdt )
27
{
28
#ifndef ENABLE_DYNDRIVERS
29
pdt->
pl_MenuStr
=
"Null device"
;
30
pdt->
pl_DevName
=
"null"
;
31
#endif
32
pdt->
pl_type
=
plDevType_Null
;
33
pdt->
pl_seq
= 42;
34
pdt->
pl_init
= (
plD_init_fp
) plD_init_null;
35
pdt->
pl_line
= (
plD_line_fp
) plD_line_null;
36
pdt->
pl_polyline
= (
plD_polyline_fp
) plD_polyline_null;
37
pdt->
pl_eop
= (
plD_eop_fp
) plD_eop_null;
38
pdt->
pl_bop
= (
plD_bop_fp
) plD_bop_null;
39
pdt->
pl_tidy
= (
plD_tidy_fp
) plD_tidy_null;
40
pdt->
pl_state
= (
plD_state_fp
) plD_state_null;
41
pdt->
pl_esc
= (
plD_esc_fp
) plD_esc_null;
42
}
43
44
//--------------------------------------------------------------------------
45
// plD_init_null()
46
//
47
// Initialize device (terminal).
48
//--------------------------------------------------------------------------
49
50
void
51
plD_init_null(
PLStream
*
PL_UNUSED
( pls ) )
52
{
53
int
xmin
= 0;
54
int
xmax
=
PIXELS_X
- 1;
55
int
ymin
= 0;
56
int
ymax
=
PIXELS_Y
- 1;
57
58
PLFLT
pxlx = (double)
PIXELS_X
/ (
double
)
LPAGE_X
;
59
PLFLT
pxly = (double)
PIXELS_Y
/ (
double
)
LPAGE_Y
;
60
61
// Set up device parameters
62
63
plP_setpxl
( pxlx, pxly );
64
plP_setphy
( xmin, xmax, ymin, ymax );
65
}
66
67
//--------------------------------------------------------------------------
68
// The remaining driver functions are all null.
69
//--------------------------------------------------------------------------
70
71
void
72
plD_line_null(
PLStream
*
PL_UNUSED
( pls ),
short
PL_UNUSED
( x1a ),
short
PL_UNUSED
( y1a ),
short
PL_UNUSED
( x2a ),
short
PL_UNUSED
( y2a ) )
73
{
74
}
75
76
void
77
plD_polyline_null(
PLStream
*
PL_UNUSED
( pls ),
short
*
PL_UNUSED
( xa ),
short
*
PL_UNUSED
( ya ),
PLINT
PL_UNUSED
( npts ) )
78
{
79
}
80
81
void
82
plD_eop_null(
PLStream
*
PL_UNUSED
( pls ) )
83
{
84
}
85
86
void
87
plD_bop_null(
PLStream
*
PL_UNUSED
( pls ) )
88
{
89
}
90
91
void
92
plD_tidy_null(
PLStream
*
PL_UNUSED
( pls ) )
93
{
94
}
95
96
void
97
plD_state_null(
PLStream
*
PL_UNUSED
( pls ),
PLINT
PL_UNUSED
( op ) )
98
{
99
}
100
101
void
102
plD_esc_null(
PLStream
*
PL_UNUSED
( pls ),
PLINT
PL_UNUSED
( op ),
void
*
PL_UNUSED
( ptr ) )
103
{
104
}
105
106
#else
107
int
108
pldummy_null
()
109
{
110
return
0;
111
}
112
113
#endif // PLD_nulldev
drivers
null.c
Generated on Sat Sep 14 2013 05:04:13 for PLplot by
1.8.4