# $XConsortium: polyline3.pi,v 5.1 91/02/16 10:00:35 rws Exp $ ## polyline3 - test ppolyline with colors 0-7 tbegintest("polyline3", "POLYLINE using colors 0-7"); source macro.pi # 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); ppost_struct(1,1,1.0); # Draw a thick vertical line so black line can be seen crossing it pset_linewidth(25.5); whiteline_points = IA_Ppoint(2, 0.4,1.5, 0.7,-0.5); whiteline = I_Ppoint_list(2, whiteline_points); ppolyline(&whiteline); pset_linewidth(6.0); foreach @color @y ( 0; 0.9; 1; 0.8; 2; 0.7; 3; 0.6; 4; 0.5; 5; 0.4; 6; 0.3; 7; 0.2; ) # set the color, draw a line at the specified y pset_line_colr_ind(@color); points2 = IA_Ppoint(2, 0.1,@y, 0.8,@y); line2 = I_Ppoint_list(2, points2); ppolyline(&line2); end; i_check_image("pline3",display,window,0,0,199,199,"lines in colors 0-7, crossing a thick white line"); i_pause(); tendtest();