Пример #1
0
void arc(double x, double y, double x0, double y0, double x1, double y1)	/* draw arc with center x,y */
{

	move(x0, y0);
	hvflush();
	printf("\\D'a%.3fi %.3fi %.3fi %.3fi'\n",
		xsc(x-x0), -ysc(y-y0), xsc(x1-x), -ysc(y1-y));	/* WATCH SIGNS */
	flyback();
}
Пример #2
0
point(xi,yi){
	struct {char pad,c; int x,y;} p;
	p.c = 2;
	p.x = xnow = xsc(xi);
	p.y = ynow =  ysc(yi);
	write(vti,&p.c,5);
}
Пример #3
0
void
point(int xi, int yi)
{
	if(xsc(xi)!=currentx || ysc(yi)!=currenty)
		move(xi,yi);
	printf("V[]");
}
Пример #4
0
void
point(int xi, int yi)
{
	if(xsc(xi)!=currentx || ysc(yi)!=currenty)
		move(xi,yi);
	buffready(1);
	putchar('d');
}
Пример #5
0
void ellipse(double x, double y, double r1, double r2)
{
	double ir1, ir2;

	move(x-r1, y);
	hvflush();
	ir1 = xsc(r1);
	ir2 = ysc(r2);
	printf("\\D'e%.3fi %.3fi'\n", 2 * ir1, 2 * fabs(ir2));
	flyback();
}
Пример #6
0
void spline(double x, double y, double n, ofloat *p, int dashed __unused, double ddval __unused)
{
	int i;
	double dx, dy;
	double xerr, yerr;

	move(x, y);
	hvflush();
	xerr = yerr = 0.0;
	printf("\\D'~");
	for (i = 0; i < 2 * n; i += 2) {
		dx = xsc(xerr += p[i]);
		xerr -= dx/xscale;
		dy = ysc(yerr += p[i+1]);
		yerr -= dy/yscale;
		printf(" %.3fi %.3fi", dx, -dy);	/* WATCH SIGN */
	}
	printf("'\n");
	flyback();
}
Пример #7
0
move(xi,yi){
		movep(xconv(xsc(xi)),yconv(ysc(yi)));
		return;
}
Пример #8
0
void
cont(int x0, int y0)
{
	iline(xnow,ynow,xconv(xsc(x0)),yconv(ysc(y0)));
	return;
}
Пример #9
0
void
line(int x0, int y0, int x1, int y1)
{
	iline(xconv(xsc(x0)),yconv(ysc(y0)),xconv(xsc(x1)),yconv(ysc(y1)));
		return;
}
Пример #10
0
cont(x0,y0){
	iline(xnow,ynow,xconv(xsc(x0)),yconv(ysc(y0)));
	return;
}
Пример #11
0
line(x0,y0,x1,y1){
	iline(xconv(xsc(x0)),yconv(ysc(y0)),xconv(xsc(x1)),yconv(ysc(y1)));
		return;
}