1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #include "sys-defines.h"
- #include "extern.h"
- #include "xmi.h"
- bool
- _pl_b_begin_page (S___(Plotter *_plotter))
- {
-
- _pl_b_new_image (S___(_plotter));
- return true;
- }
- void
- _pl_b_new_image (S___(Plotter *_plotter))
- {
- unsigned char red, green, blue;
- miPixel pixel;
-
- red = ((unsigned int)(_plotter->drawstate->bgcolor.red) >> 8) & 0xff;
- green = ((unsigned int)(_plotter->drawstate->bgcolor.green) >> 8) & 0xff;
- blue = ((unsigned int)(_plotter->drawstate->bgcolor.blue) >> 8) & 0xff;
- pixel.type = MI_PIXEL_RGB_TYPE;
- pixel.u.rgb[0] = red;
- pixel.u.rgb[1] = green;
- pixel.u.rgb[2] = blue;
-
- _plotter->b_painted_set = (void *)miNewPaintedSet ();
- _plotter->b_canvas = (void *)miNewCanvas ((unsigned int)_plotter->b_xn, (unsigned int)_plotter->b_yn, pixel);
- }
|