home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
postscpt
/
hpgl2ps.arc
/
PLOTDOT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-08-08
|
746b
|
41 lines
/* plotdot.c */
/*
* Plot a dot or symbol on the paper
*/
#include "defn.h"
plotdot(type)
char *type;
{
end_draw();
while (SIGNED_NUMERIC)
{
xval = getval() * XSCALE;
yval = getval() * YSCALE;
if (type == RMOVE)
{
absX += xval;
absY += yval;
} else
if (type == MOVE)
{
absX = xval + offX;
absY = yval + offY;
} else
{
fprintf(stderr, "Error: expecting move command not %s\n", type);
exit(1);
}
if (SYMBOL)
printf("%g %g 5 %g (%c) Text\n", absX, absY, char_angle, symbl);
else if (SETDOT)
{
printf("newpath\n");
printf(" %g %g %s %g %g %s\n", absX, absY, MOVE, absX, absY, DRAW);
printf("stroke\n");
}
}
}