static void genlin(short *x, short *y, PLINT npts) { /* Check for solid line */ if (plsc->nms == 0) { if (npts== 2) plP_line(x, y); else plP_polyline(x, y, npts); } /* Right now dashed lines don't use polyline capability -- this should be improved */ else { PLINT i; /* Call escape sequence to draw dashed lines, only for drivers that have this capability */ if (plsc->dev_dash) { plsc->dev_npts = npts; plsc->dev_x = x; plsc->dev_y = y; plP_esc(PLESC_DASH, NULL); return; } for (i = 0; i < npts - 1; i++) { grdashline(x+i, y+i); } } }
static void rdbuf_polyline(PLStream *pls) { short xpl[PL_MAXPOLY], ypl[PL_MAXPOLY]; PLINT npts; dbug_enter("rdbuf_polyline"); fread(&npts, sizeof(PLINT), 1, pls->plbufFile); fread(xpl, sizeof(short), npts, pls->plbufFile); fread(ypl, sizeof(short), npts, pls->plbufFile); plP_polyline(xpl, ypl, npts); }