1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl test.pl'
4 ######################### We start with some black magic to print on failure.
6 # Change 1..1 below to 1..last_test_to_print .
7 # (It may become useful if the test is moved to ./t subdirectory.)
9 BEGIN { $| = 1; print "1..3\n"; }
10 END {print "not ok 1\n" unless $loaded;}
18 init_log("testout/t75aapolyaa.log",1);
20 $green=i_color_new(0,255,0,0);
23 $img=Imager->new(xsize=>10,ysize=>10);
28 #@rand=map { rand($rn) } 0..$nums-1;
29 #@angle=sort { $a<=>$b } map { rand(360) } 0..$nums-1;
31 #@x=map { 25+(10+$rand[$_])*cos($angle[$_]/180*3.1415) } 0..$nums-1;
32 #@y=map { 25+(10+$rand[$_])*sin($angle[$_]/180*3.1415) } 0..$nums-1;
34 #i_poly_aa($img,[50,300,290,200],[50,60,190,220],$green);
42 @x=map { $_+0.5 } (0, 8, 8);
43 @y=map { $_+0.5 } (0, 4, 0);
45 i_poly_aa($img->{IMG},\@x,\@y,$green);
50 #$red=i_color_new(255,0,0,0);
51 #$img->polyline(color=>$red,'x'=>\@x,'y'=>\@y,antialias=>0);
54 open(FH,">testout/t75.ppm") || die "Cannot open testout/t75.ppm\n";
55 i_writeppm($img->{IMG},fileno(FH)) || die "Cannot write testout/t75.ppm\n";