12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #include "sys-defines.h"
- #include "extern.h"
- #include "xmi.h"
- void
- _pl_i_paint_point (S___(Plotter *_plotter))
- {
- double xx, yy;
- int ixx, iyy;
- miGC *pGC;
- miPixel fgPixel, bgPixel, pixels[2];
- miPoint point, offset;
- if (_plotter->drawstate->pen_type != 0)
-
- {
-
- xx = XD(_plotter->drawstate->pos.x, _plotter->drawstate->pos.y);
- yy = YD(_plotter->drawstate->pos.x, _plotter->drawstate->pos.y);
-
-
- ixx = IROUND(xx);
- iyy = IROUND(yy);
-
-
- _pl_i_set_pen_color (S___(_plotter));
- bgPixel.type = MI_PIXEL_INDEX_TYPE;
- bgPixel.u.index = _plotter->drawstate->i_bg_color_index;
- fgPixel.type = MI_PIXEL_INDEX_TYPE;
- fgPixel.u.index = _plotter->drawstate->i_pen_color_index;
- pixels[0] = bgPixel;
- pixels[1] = fgPixel;
-
-
- pGC = miNewGC (2, pixels);
- _set_common_mi_attributes (_plotter->drawstate, (void *)pGC);
-
- point.x = ixx;
- point.y = iyy;
- miDrawPoints ((miPaintedSet *)_plotter->i_painted_set,
- pGC, MI_COORD_MODE_ORIGIN, 1, &point);
-
-
- miDeleteGC (pGC);
-
-
- offset.x = 0;
- offset.y = 0;
- miCopyPaintedSetToCanvas ((miPaintedSet *)_plotter->i_painted_set,
- (miCanvas *)_plotter->i_canvas,
- offset);
- miClearPaintedSet ((miPaintedSet *)_plotter->i_painted_set);
-
-
- _plotter->i_frame_nonempty = true;
- }
- }
|