123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- #include "sys-defines.h"
- #include "extern.h"
- #ifndef LIBPLOTTER
- const Plotter _pl_n_default_plotter =
- {
-
- _pl_n_initialize, _pl_n_terminate,
-
- _pl_b_begin_page, _pl_b_erase_page, _pl_b_end_page,
-
- _pl_g_push_state, _pl_g_pop_state,
-
- _pl_b_paint_path, _pl_b_paint_paths, _pl_g_path_is_flushable, _pl_g_maybe_prepaint_segments,
-
- _pl_g_paint_marker, _pl_b_paint_point,
-
- _pl_g_paint_text_string_with_escapes, _pl_g_paint_text_string,
- _pl_g_get_text_width,
-
- _pl_g_retrieve_font,
-
- _pl_g_flush_output,
-
- _pl_g_warning,
- _pl_g_error,
- };
- #endif
- void
- _pl_n_initialize (S___(Plotter *_plotter))
- {
- #ifndef LIBPLOTTER
-
- _pl_b_initialize (S___(_plotter));
- #endif
-
- #ifndef LIBPLOTTER
-
- _plotter->data->type = PL_PNM;
- #endif
-
- _plotter->data->output_model = PL_OUTPUT_VIA_CUSTOM_ROUTINES;
-
- _plotter->n_portable_output = false;
-
-
-
- {
- const char *portable_s;
-
- portable_s = (const char *)_get_plot_param (_plotter->data, "PNM_PORTABLE");
- if (strcasecmp (portable_s, "yes") == 0)
- _plotter->n_portable_output = true;
- else
- _plotter->n_portable_output = false;
- }
- }
- void
- _pl_n_terminate (S___(Plotter *_plotter))
- {
- #ifndef LIBPLOTTER
-
- _pl_b_terminate (S___(_plotter));
- #endif
- }
- #ifdef LIBPLOTTER
- PNMPlotter::PNMPlotter (FILE *infile, FILE *outfile, FILE *errfile)
- : BitmapPlotter (infile, outfile, errfile)
- {
- _pl_n_initialize ();
- }
- PNMPlotter::PNMPlotter (FILE *outfile)
- : BitmapPlotter (outfile)
- {
- _pl_n_initialize ();
- }
- PNMPlotter::PNMPlotter (istream& in, ostream& out, ostream& err)
- : BitmapPlotter (in, out, err)
- {
- _pl_n_initialize ();
- }
- PNMPlotter::PNMPlotter (ostream& out)
- : BitmapPlotter (out)
- {
- _pl_n_initialize ();
- }
- PNMPlotter::PNMPlotter ()
- {
- _pl_n_initialize ();
- }
- PNMPlotter::PNMPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶meters)
- : BitmapPlotter (infile, outfile, errfile, parameters)
- {
- _pl_n_initialize ();
- }
- PNMPlotter::PNMPlotter (FILE *outfile, PlotterParams ¶meters)
- : BitmapPlotter (outfile, parameters)
- {
- _pl_n_initialize ();
- }
- PNMPlotter::PNMPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶meters)
- : BitmapPlotter (in, out, err, parameters)
- {
- _pl_n_initialize ();
- }
- PNMPlotter::PNMPlotter (ostream& out, PlotterParams ¶meters)
- : BitmapPlotter (out, parameters)
- {
- _pl_n_initialize ();
- }
- PNMPlotter::PNMPlotter (PlotterParams ¶meters)
- : BitmapPlotter (parameters)
- {
- _pl_n_initialize ();
- }
- PNMPlotter::~PNMPlotter ()
- {
- _pl_n_terminate ();
- }
- #endif
|