]> git.imager.perl.org - imager.git/blob - t/x11rubthru.t
5f7836da0fef3c21e7fa42ffdab484998eab6a0b
[imager.git] / t / x11rubthru.t
1 #!perl -w
2 use strict;
3 use Imager;
4 use Imager::Test qw(is_image);
5 use Test::More;
6
7 Imager::i_has_format("tiff")
8   or plan skip_all => "no tiff support";
9
10 plan tests => 2;
11
12 my $dest = Imager->new(xsize => 100, ysize => 100, channels => 4);
13 $dest->box(filled => 1, color => '0000FF');
14 my $src = Imager->new(xsize => 100, ysize => 100, channels => 4);
15 $src->circle(color => 'FF0000', x => 50, y => 60, r => 40, aa => 1);
16 ok($dest->rubthrough(src => $src, src_minx => 10, src_miny => 20, src_maxx => 90,
17                tx => 10, ty => 10), "rubthrough");
18 ok($dest->write(file => "testout/x11rubthru.tif"), "save it");
19