- use PERL_NO_GET_CONTEXT to slightly improve performance on threaded
perls (not measured)
+ - an opacity fill based on a fountain fill would segfault when
+ filling an 8-bit/sample image.
+
Imager 0.74 - 7 May 2010
===========
fill->other_fill = base_fill;
fill->alpha_mult = alpha_mult;
+ if (!base_fill->f_fill_with_color) {
+ /* base fill only does floating, so we only do that too */
+ fill->base.f_fill_with_color = NULL;
+ }
+
return &fill->base;
}
#!perl -w
use strict;
-use Test::More tests => 153;
+use Test::More tests => 156;
use Imager ':handy';
use Imager::Fill;
is_color3($im->getpixel(x => 0, y => 0), 255, 255, 255,
"check for correct colour");
}
+
+ {
+ require Imager::Fountain;
+ my $fount = Imager::Fountain->new;
+ $fount->add(c1 => "FFFFFF"); # simple white to black
+ # base fill is a fountain
+ my $base_fill = Imager::Fill->new
+ (
+ fountain => "linear",
+ segments => $fount,
+ xa => 0,
+ ya => 0,
+ xb => 100,
+ yb => 100,
+ );
+ ok($base_fill, "made fountain fill base");
+ my $op_fill = Imager::Fill->new
+ (
+ type => "opacity",
+ other => $base_fill,
+ opacity => 0.5,
+ );
+ ok($op_fill, "made opacity fountain fill");
+ my $im = Imager->new(xsize => 100, ysize => 100);
+ ok($im->box(fill => $op_fill), "draw with it");
+ }
}
sub color_close {