Ejemplo n.º 1
0
void
pl_box(register FILE *plotfp, int x1, int y1, int x2, int y2)
{
    pl_move( plotfp, x1, y1 );
    pl_cont( plotfp, x1, y2 );
    pl_cont( plotfp, x2, y2 );
    pl_cont( plotfp, x2, y1 );
    pl_cont( plotfp, x1, y1 );
    pl_move( plotfp, x2, y2 );
}
Ejemplo n.º 2
0
/**
 *			T P _ I 2 L I S T
 *
 *  Take a set of x, y coordinates, and plot them as a
 *  polyline, ie, connect them with line segments.
 *  For markers, use tp_mlist(), below.
 *  This "C" interface expects arrays of INTs.
 */
void
tp_i2list(register FILE *fp, register int *x, register int *y, register int npoints)

    /* array of points */
    /* array of points */

{
    if ( npoints <= 0 )
	return;

    pl_move( fp, *x++, *y++ );
    while ( --npoints > 0 )
	pl_cont( fp, *x++, *y++ );
}
Ejemplo n.º 3
0
/**
 * P L O T _ 2 D _ G O T O
 */
HIDDEN int
plot_drawLine2D(struct dm *dmp, fastf_t xpos1, fastf_t ypos1, fastf_t xpos2, fastf_t ypos2)
{
    int sx1, sy1;
    int sx2, sy2;

    sx1 = xpos1 * 2047;
    sx2 = xpos2 * 2047;
    sy1 = ypos1 + 2047;
    sy2 = ypos2 + 2047;
    pl_move(((struct plot_vars *)dmp->dm_vars.priv_vars)->up_fp, sx1, sy1);
    pl_cont(((struct plot_vars *)dmp->dm_vars.priv_vars)->up_fp, sx2, sy2);

    return TCL_OK;
}
Ejemplo n.º 4
0
/*
 *			P L O T _ 2 D _ G O T O
 *
 */
static int
plot_drawLine2D(struct dm *dmp, fastf_t x1, fastf_t y1, fastf_t x2, fastf_t y2)
{
    int	sx1, sy1;
    int	sx2, sy2;

    sx1 = x1 * 2047;
    sx2 = x2 * 2047;
    sy1 = y1 + 2047;
    sy2 = y2 + 2047;
    pl_move(((struct plot_vars *)dmp->dm_vars.priv_vars)->up_fp, sx1, sy1);
    pl_cont(((struct plot_vars *)dmp->dm_vars.priv_vars)->up_fp, sx2, sy2);

    return TCL_OK;
}