123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- #include "sys-defines.h"
- #include "extern.h"
- #include "xmi.h"
- bool
- _pl_i_begin_page (S___(Plotter *_plotter))
- {
-
-
- _plotter->i_painted_set = (void *)NULL;
- _plotter->i_canvas = (void *)NULL;
- _plotter->i_num_color_indices = 0;
- _plotter->i_bit_depth = 0;
- _plotter->i_frame_nonempty = false;
- _plotter->i_pixels_scanned = 0;
- _plotter->i_pass = 0;
- _plotter->i_hot.x = 0;
- _plotter->i_hot.y = 0;
- _plotter->i_header_written = false;
-
- _pl_i_new_image (S___(_plotter));
-
-
- _plotter->i_frame_nonempty = false;
-
- _plotter->i_header_written = false;
- return true;
- }
- void
- _pl_i_new_image (S___(Plotter *_plotter))
- {
- int i;
- miPixel pixel;
-
-
- _plotter->i_num_color_indices = 0;
- for (i = 0; i < 256; i++)
- {
- _plotter->i_colormap[i].red = 0;
- _plotter->i_colormap[i].green = 0;
- _plotter->i_colormap[i].blue = 0;
- }
-
- _plotter->drawstate->i_pen_color_status = false;
- _plotter->drawstate->i_fill_color_status = false;
- _plotter->drawstate->i_bg_color_status = false;
-
- if (_plotter->i_transparent && _plotter->i_animation)
-
- _pl_i_new_color_index (R___(_plotter)
- _plotter->i_transparent_color.red,
- _plotter->i_transparent_color.green,
- _plotter->i_transparent_color.blue);
-
- _pl_i_set_bg_color (S___(_plotter));
- pixel.type = MI_PIXEL_INDEX_TYPE;
- pixel.u.index = _plotter->drawstate->i_bg_color_index;
-
- _plotter->i_painted_set = (void *)miNewPaintedSet ();
- _plotter->i_canvas = (void *)miNewCanvas ((unsigned int)_plotter->i_xn, (unsigned int)_plotter->i_yn, pixel);
- }
|