# $XConsortium: polyline1.pi,v 5.1 91/02/16 10:00:34 rws Exp $
## polyline1 - test /*WARNING: parameters changed */ ppolyline with all default attributes, and different
## numbers of points: 0, 1, 2, 3, and 10

tbegintest("polyline1", "test POLYLINE with various numbers of points");

source macro.pi		

points0 = IA_Ppoint(0);
points1 = IA_Ppoint(1, 0.1, 0.9);
points2 = IA_Ppoint(2, 0.1,0.8, 0.8,0.75);
points3 = IA_Ppoint(3, 0.1,0.6, 0.5,0.7, 0.9,0.5);
points10 = IA_Ppoint(10, 0.1,0.4, 0.2,0.5, 0.3,0.3, 0.4,0.5, 0.5,0.2,
			 0.6,0.4, 0.7,0.1, 0.8,0.5, 0.9,0.2, 0.92,0.5);
line0 = I_Ppoint_list(0, points0);
line1 = I_Ppoint_list(1, points1);
line2 = I_Ppoint_list(2, points2);
line3 = I_Ppoint_list(3, points3);
line10 = I_Ppoint_list(10, points10);

# Set up phigs, workstation, and structure
i_open_phigs(NULL,PDEF_MEM_SIZE);
i_open_x_ws(1, &display, &window, 100, 300, 200, 200);
popen_struct(1);

ppolyline(&line0);
ppolyline(&line1);
ppolyline(&line2);
ppolyline(&line3);
ppolyline(&line10);

ppost_struct(1,1,1.0);

i_check_image("pline1",display,window,0,0,199,199,"polylines w/ 0,1,2,3,10 points");
i_pause();

tendtest();
