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