/* play has no polymarker primitive, use GpPseudoMark-- unless user requested tiny points, in which case we use p_dots */ static int DrawMarkers(Engine *engine, long n, const GpReal *px, const GpReal *py) { XEngine *xeng = (XEngine *)engine; p_win *w = xeng->w; if (!w || !xeng->mapped) return 1; xeng->e.marked = 1; if (gistA.m.type!=M_POINT || gistA.m.size>1.5) { return GpPseudoMark(engine, n, px, py); } else { long i, imax; int npts; GpXYMap *map= &xeng->e.map; double xt[2], yt[2]; xt[0] = map->x.scale; xt[1] = map->x.offset; yt[0] = map->y.scale; yt[1] = map->y.offset; p_d_map(w, xt, yt, 1); chk_clipping(xeng); p_color(w, gistA.m.color); for (i=0 ; i<n ; i=imax) { imax = i+2048; npts = (imax<=n)? 2048 : (int)(n-i); p_d_pnts(w, px+i, py+i, npts); p_dots(w); } return 0; } }
int GpMarkers(long n, const GpReal *px, const GpReal *py) { int value= 0; Engine *engine; if (gistClip) { InitializeClip(); n= ClipPoints(px, py, n); px= xClip; py= yClip; } gpClipInit= 0; for (engine=GpNextActive(0) ; engine ; engine=GpNextActive(engine)) { if (!engine->inhibit) { if (gistA.m.type<=32) value|= engine->DrawMarkers(engine, n, px, py); else value|= GpPseudoMark(engine, n, px, py); } } return value; }