| 1 | #!perl -w | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use blib; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use Imager; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Test::More tests => 3; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | BEGIN { use_ok('Imager::Filter::Flines') } | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | -d "testout" or mkdir "testout"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 10 | |||||||||||
| 11 | 1 | Imager->open_log(log => "testout/t00flines.log"); | |||||||||
| 12 | |||||||||||
| 13 | { | ||||||||||
| 14 | 1 | my $im = Imager->new(xsize=>150, ysize=>150); | |||||||||
| 15 | |||||||||||
| 16 | 1 | $im->box(filled=>1, xmin => 70, ymin=>25, xmax =>130, ymax => 125, | |||||||||
| 17 | color=>'00FF00'); | ||||||||||
| 18 | 1 | $im->box(filled=>1, xmin=>20, ymin=>25, xmax=>80, ymax=>125, | |||||||||
| 19 | color => '0000FF'); | ||||||||||
| 20 | 1 | $im->arc(x =>75, y=>75, r=>30, color => 'FF0000'); | |||||||||
| 21 | 1 | $im->filter(type=>"conv", coef => [0.1, 0.2, 0.4, 0.2, 0.1]); | |||||||||
| 22 | |||||||||||
| 23 | 1 | ▶ | ok($im->filter(type=>'flines'), | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | "try filter") | ||||||||||
| 25 | or print "# ", $im->errstr, "\n"; | ||||||||||
| 26 | 1 | ok($im->write(file => 'testout/t00flines.ppm'), | |||||||||
| 27 | "save result"); | ||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 1 | ▶ | END { | ||||||||
|
Subroutine
END: called CC=2 SCAR=7.0
| |||||||||||
| 31 | 1 | Imager->close_log; | |||||||||
| 32 | |||||||||||
| 33 | 1 | ▶ | unless ($ENV{IMAGER_KEEP_FILES}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 1 | unlink 'testout/t00flines.ppm'; | |||||||||
| 35 | 1 | unlink "testout/t00flines.log"; | |||||||||
| 36 | 1 | rmdir "testout"; | |||||||||
| 37 | } | ||||||||||
| 38 | } | ||||||||||