#include <stdio.h>
#include "graph.h"
#include <math.h>

main()
	{
	int mode;
	double re, im, a, x, y, xt, d_to_r, lab_y;
	char *idx;

	mode = CGA_320x200;		/* CGA 640x200 BW */

	g_init (mode);			/* select graphics mode: default pen = 1, lable origin = 1 */
	if (ratio () < 1)
		lab_y = 95 * ratio ();	/* 100 gdu's in horizontal direction */
	else
		lab_y = 95;		/* 100 gdu's in vertical direction */
	move (0,0);
	csize (3,0,0);			/* change size of label */
	labelf ("Default Hard Clip Limit");
	line_type (3, 10);
	frame ();			/* frame hard clip limit */
	limit (8.0, 210.0, 13, 150);	/* set new hard clip limits (mm's) */
	line_type (1,0);
	move (0, 0);
	labelf ("New Hard Clip Limit");
	line_type (4,0);
	frame ();			/* frame new hard clip limit */
	line_type (1,0);
	lorg (1);
	move (10, 10);
	csize (2.8,0,0);
	labelf ("Viewport & Soft Clip Limit");
	move (10,90);
	csize (4,0,0);
	labelf ("Line Types and Labels");
	csize (4,0,0);
	ldir (0);
	move (70,0);
	labelf ("Horizontal ");		/* labels */
	ldir (45);
	labelf ("Diagonal ");
	ldir (90);
	labelf ("Vertical");
	locate (10.0, 95.0, 10.0, 90.0 );	/* units in gdu's */
	line_type (5,0);
	frame ();			/* frame locate window */
	show (0, 80.0, 0, 120.0);	/* isotropic scaling */
					/* changes from gdu's to udu's */
	csize (3,0,0);
	ldir (0);
	lorg (8);
	line_type (1,0);
	move (15,15);
	labelf ("type 1");
	move (15,15);
	draw (65,15);
	line_type (1,0);
	move (15,25);
	labelf ("type 2");
	line_type (2,0);
	move (15,25);
	draw (65,25);
	line_type (1,0);
	move (15,35);
	labelf ("type 3");
	line_type (3,0);
	move (15,35);
	draw (65,35);
	line_type (1,0);
	move (15,45);
	labelf ("type 4");
	line_type (4,0);
	move (15,45);
	draw (65,45);
	line_type (1,0);
	move (15,55);
	labelf ("type 5");
	line_type (5,0);
	move (15,55);
	draw (65,55);
	line_type (1,0);
	move (15,65);
	labelf ("type 6");
	line_type (6,0);
	move (15,65);
	draw (65,65);
	line_type (1,0);
	move (15,75);
	labelf ("type 7");
	line_type (7,0);
	move (15,75);
	draw (65,75);
	line_type (1,0);
	move (15,85);
	labelf ("type 8");
	line_type (8,0);
	move (15,85);
	draw (65,85);
	line_type (1,0);
	move (15,95);
	labelf ("type 9");
	line_type (9,0);
	move (15,95);
	draw (65,95);
	line_type (1,0);
	move (15,105);
	labelf ("type 10");
	line_type (10,0);
	move (15,105);
	draw (65,105);
	move (90,85);
	exit(0);
	}

