123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- #include "sys-defines.h"
- #include "extern.h"
- #ifndef LIBPLOTTER
- const Plotter _pl_r_default_plotter =
- {
-
- _pl_r_initialize, _pl_r_terminate,
-
- _pl_r_begin_page, _pl_r_erase_page, _pl_r_end_page,
-
- _pl_g_push_state, _pl_g_pop_state,
-
- _pl_r_paint_path, _pl_r_paint_paths, _pl_r_path_is_flushable, _pl_r_maybe_prepaint_segments,
-
- _pl_g_paint_marker, _pl_r_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_r_initialize (S___(Plotter *_plotter))
- {
- #ifndef LIBPLOTTER
-
- _pl_g_initialize (S___(_plotter));
- #endif
-
- #ifndef LIBPLOTTER
-
- _plotter->data->type = PL_REGIS;
- #endif
-
- _plotter->data->output_model = PL_OUTPUT_VIA_CUSTOM_ROUTINES_IN_REAL_TIME;
-
-
- _plotter->data->have_wide_lines = 0;
- _plotter->data->have_dash_array = 0;
- _plotter->data->have_solid_fill = 1;
- _plotter->data->have_odd_winding_fill = 1;
- _plotter->data->have_nonzero_winding_fill = 0;
- _plotter->data->have_settable_bg = 1;
- _plotter->data->have_escaped_string_support = 0;
- _plotter->data->have_ps_fonts = 0;
- _plotter->data->have_pcl_fonts = 0;
- _plotter->data->have_stick_fonts = 0;
- _plotter->data->have_extra_stick_fonts = 0;
- _plotter->data->have_other_fonts = 0;
-
- _plotter->data->default_font_type = PL_F_HERSHEY;
- _plotter->data->pcl_before_ps = false;
- _plotter->data->have_horizontal_justification = false;
- _plotter->data->have_vertical_justification = false;
- _plotter->data->issue_font_warning = true;
-
- _plotter->data->max_unfilled_path_length = PL_MAX_UNFILLED_PATH_LENGTH;
- _plotter->data->have_mixed_paths = false;
- _plotter->data->allowed_arc_scaling = AS_NONE;
- _plotter->data->allowed_ellarc_scaling = AS_NONE;
- _plotter->data->allowed_quad_scaling = AS_NONE;
- _plotter->data->allowed_cubic_scaling = AS_NONE;
- _plotter->data->allowed_box_scaling = AS_NONE;
- _plotter->data->allowed_circle_scaling = AS_UNIFORM;
- _plotter->data->allowed_ellipse_scaling = AS_NONE;
-
- _plotter->data->display_model_type = (int)DISP_MODEL_VIRTUAL;
- _plotter->data->display_coors_type = (int)DISP_DEVICE_COORS_INTEGER_NON_LIBXMI;
- _plotter->data->flipped_y = true;
- _plotter->data->imin = 144;
- _plotter->data->imax = 623;
- _plotter->data->jmin = 479;
- _plotter->data->jmax = 0;
- _plotter->data->xmin = 0.0;
- _plotter->data->xmax = 0.0;
- _plotter->data->ymin = 0.0;
- _plotter->data->ymax = 0.0;
- _plotter->data->page_data = (plPageData *)NULL;
-
- _compute_ndc_to_device_map (_plotter->data);
-
- _plotter->regis_pos.x = 0;
- _plotter->regis_pos.y = 0;
- _plotter->regis_position_is_unknown = true;
- _plotter->regis_line_type = PL_L_SOLID;
- _plotter->regis_line_type_is_unknown = true;
- _plotter->regis_fgcolor = 0;
- _plotter->regis_bgcolor = 0;
- _plotter->regis_fgcolor_is_unknown = true;
- _plotter->regis_bgcolor_is_unknown = true;
-
- }
- void
- _pl_r_terminate (S___(Plotter *_plotter))
- {
- #ifndef LIBPLOTTER
-
- _pl_g_terminate (S___(_plotter));
- #endif
- }
- #ifdef LIBPLOTTER
- ReGISPlotter::ReGISPlotter (FILE *infile, FILE *outfile, FILE *errfile)
- :Plotter (infile, outfile, errfile)
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::ReGISPlotter (FILE *outfile)
- :Plotter (outfile)
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::ReGISPlotter (istream& in, ostream& out, ostream& err)
- : Plotter (in, out, err)
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::ReGISPlotter (ostream& out)
- : Plotter (out)
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::ReGISPlotter ()
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::ReGISPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶meters)
- :Plotter (infile, outfile, errfile, parameters)
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::ReGISPlotter (FILE *outfile, PlotterParams ¶meters)
- :Plotter (outfile, parameters)
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::ReGISPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶meters)
- : Plotter (in, out, err, parameters)
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::ReGISPlotter (ostream& out, PlotterParams ¶meters)
- : Plotter (out, parameters)
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::ReGISPlotter (PlotterParams ¶meters)
- : Plotter (parameters)
- {
- _pl_r_initialize ();
- }
- ReGISPlotter::~ReGISPlotter ()
- {
-
- if (_plotter->data->open)
- _API_closepl ();
- _pl_r_terminate ();
- }
- #endif
|