123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #define X_POINT_FLUSH_PERIOD 8
- #include "sys-defines.h"
- #include "extern.h"
- void
- _pl_x_paint_point (S___(Plotter *_plotter))
- {
- double xx, yy;
- int ix, iy;
- plColor oldcolor, newcolor;
- if (_plotter->drawstate->pen_type != 0)
-
- {
-
- newcolor = _plotter->drawstate->fgcolor;
- oldcolor = _plotter->drawstate->x_current_fgcolor;
- if (newcolor.red != oldcolor.red
- || newcolor.green != oldcolor.green
- || newcolor.blue != oldcolor.blue
- || ! _plotter->drawstate->x_gc_fgcolor_status)
- _pl_x_set_pen_color (S___(_plotter));
-
- xx = XD(_plotter->drawstate->pos.x, _plotter->drawstate->pos.y);
- yy = YD(_plotter->drawstate->pos.x, _plotter->drawstate->pos.y);
- ix = IROUND(xx);
- iy = IROUND(yy);
- if (_plotter->x_double_buffering != X_DBL_BUF_NONE)
-
- XDrawPoint (_plotter->x_dpy, _plotter->x_drawable3,
- _plotter->drawstate->x_gc_fg,
- ix, iy);
- else
-
- {
- if (_plotter->x_drawable1)
- XDrawPoint (_plotter->x_dpy, _plotter->x_drawable1,
- _plotter->drawstate->x_gc_fg,
- ix, iy);
- if (_plotter->x_drawable2)
- XDrawPoint (_plotter->x_dpy, _plotter->x_drawable2,
- _plotter->drawstate->x_gc_fg,
- ix, iy);
- }
- }
-
-
- if (_plotter->x_paint_pixel_count % X_POINT_FLUSH_PERIOD == 0)
- _maybe_handle_x_events (S___(_plotter));
- _plotter->x_paint_pixel_count++;
- }
|