]> git.imager.perl.org - imager.git/blob - t/t75polyaa.t
skip tests that we've added
[imager.git] / t / t75polyaa.t
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'
3
4 ######################### We start with some black magic to print on failure.
5
6 # Change 1..1 below to 1..last_test_to_print .
7 # (It may become useful if the test is moved to ./t subdirectory.)
8
9 BEGIN { $| = 1; print "1..3\n"; }
10 END {print "not ok 1\n" unless $loaded;}
11 use Imager qw(:all);
12
13
14 $Imager::DEBUG=1;
15 $loaded = 1;
16 print "ok 1\n";
17
18 init_log("testout/t75aapolyaa.log",1);
19
20 $green=i_color_new(0,255,0,0);
21
22
23 $img=Imager->new(xsize=>10,ysize=>10);
24
25 #$nums=10;
26 #$rn=10;
27
28 #@rand=map { rand($rn) } 0..$nums-1;
29 #@angle=sort { $a<=>$b } map { rand(360) } 0..$nums-1;
30
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;
33
34 #i_poly_aa($img,[50,300,290,200],[50,60,190,220],$green);
35
36 $x1=16;
37 $y1=10;
38
39 @x=(1, $x1, $x1);
40 @y=(1,  1, $y1);
41
42 @x=map { $_+0.5 } (0, 8, 8);
43 @y=map { $_+0.5 } (0, 4, 0);
44
45 i_poly_aa($img->{IMG},\@x,\@y,$green);
46
47 push(@x,$x[0]);
48 push(@y,$y[0]);
49
50 #$red=i_color_new(255,0,0,0);
51 #$img->polyline(color=>$red,'x'=>\@x,'y'=>\@y,antialias=>0);
52 print "ok 2\n";
53
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";
56 close(FH);
57
58 print "ok 3\n";
59
60 #malloc_state();