Go to the documentation of this file.00001
00002
00003
00004
00005 #include "plDevs.h"
00006
00007 #ifdef PLD_null
00008
00009 #include "plplotP.h"
00010 #include "drivers.h"
00011
00012
00013 PLDLLIMPEXP_DRIVER const char* plD_DEVICE_INFO_null = "null:Null device:-1:null:42:null\n";
00014
00015 void plD_dispatch_init_null( PLDispatchTable *pdt );
00016
00017 void plD_init_null( PLStream * );
00018 void plD_line_null( PLStream *, short, short, short, short );
00019 void plD_polyline_null( PLStream *, short *, short *, PLINT );
00020 void plD_eop_null( PLStream * );
00021 void plD_bop_null( PLStream * );
00022 void plD_tidy_null( PLStream * );
00023 void plD_state_null( PLStream *, PLINT );
00024 void plD_esc_null( PLStream *, PLINT, void * );
00025
00026 void plD_dispatch_init_null( PLDispatchTable *pdt )
00027 {
00028 #ifndef ENABLE_DYNDRIVERS
00029 pdt->pl_MenuStr = "Null device";
00030 pdt->pl_DevName = "null";
00031 #endif
00032 pdt->pl_type = plDevType_Null;
00033 pdt->pl_seq = 42;
00034 pdt->pl_init = (plD_init_fp) plD_init_null;
00035 pdt->pl_line = (plD_line_fp) plD_line_null;
00036 pdt->pl_polyline = (plD_polyline_fp) plD_polyline_null;
00037 pdt->pl_eop = (plD_eop_fp) plD_eop_null;
00038 pdt->pl_bop = (plD_bop_fp) plD_bop_null;
00039 pdt->pl_tidy = (plD_tidy_fp) plD_tidy_null;
00040 pdt->pl_state = (plD_state_fp) plD_state_null;
00041 pdt->pl_esc = (plD_esc_fp) plD_esc_null;
00042 }
00043
00044
00045
00046
00047
00048
00049
00050 void
00051 plD_init_null( PLStream *pls )
00052 {
00053 int xmin = 0;
00054 int xmax = PIXELS_X - 1;
00055 int ymin = 0;
00056 int ymax = PIXELS_Y - 1;
00057
00058 PLFLT pxlx = (double) PIXELS_X / (double) LPAGE_X;
00059 PLFLT pxly = (double) PIXELS_Y / (double) LPAGE_Y;
00060
00061
00062
00063 plP_setpxl( pxlx, pxly );
00064 plP_setphy( xmin, xmax, ymin, ymax );
00065 }
00066
00067
00068
00069
00070
00071 void
00072 plD_line_null( PLStream *pls, short x1a, short y1a, short x2a, short y2a )
00073 {
00074 }
00075
00076 void
00077 plD_polyline_null( PLStream *pls, short *xa, short *ya, PLINT npts )
00078 {
00079 }
00080
00081 void
00082 plD_eop_null( PLStream *pls )
00083 {
00084 }
00085
00086 void
00087 plD_bop_null( PLStream *pls )
00088 {
00089 }
00090
00091 void
00092 plD_tidy_null( PLStream *pls )
00093 {
00094 }
00095
00096 void
00097 plD_state_null( PLStream *pls, PLINT op )
00098 {
00099 }
00100
00101 void
00102 plD_esc_null( PLStream *pls, PLINT op, void *ptr )
00103 {
00104 }
00105
00106 #else
00107 int
00108 pldummy_null()
00109 {
00110 return 0;
00111 }
00112
00113 #endif // PLD_nulldev