truncated early.
https://rt.cpan.org/Ticket/Display.html?id=88993
+ - Imager::Font::Wrap no longer requires the image parameter.
+ https://rt.cpan.org/Ticket/Display.html?id=87338
+
Imager 0.97 - 15 Jul 2013
===========
use Imager::Font;
use vars qw($VERSION);
-$VERSION = "1.003";
+$VERSION = "1.004";
*_first = \&Imager::Font::_first;
# try to get something useful
my $x = _first(delete $input{'x'}, 0);
my $y = _first(delete $input{'y'}, 0);
- exists $input{image}
- or return Imager->_set_error('No image parameter supplied');
my $im = delete $input{image};
my $imerr = $im || 'Imager';
my $width = delete $input{width};
=item *
C<image> - The image to render the text to. Can be supplied as
-C<undef> to simply calculate the bounding box.
+C<undef> or not provided to simply calculate the bounding box.
=item *
#!perl -w
use strict;
-use Test::More tests => 13;
+use Test::More tests => 14;
BEGIN { use_ok('Imager') }
SKIP:
{
$Imager::formats{'tt'} || $Imager::formats{'ft2'}
- or skip("Need Freetype 1.x or 2.x to test", 11);
+ or skip("Need Freetype 1.x or 2.x to test", 12);
ok($font, "loading font")
or skip("Could not load test font", 8);
justify=>'left',
color=>'FFFFFF'),
"no image test");
+ ok(scalar Imager::Font::Wrap->wrap_text(string => $text,
+ font=>$font,
+ size=>13,
+ width => 380,
+ x=>10, 'y'=>10,
+ justify=>'left',
+ color=>'FFFFFF'),
+ "no image parameter test");
my $bbox = $font->bounding_box(string=>"Xx", size=>13);
ok($bbox, "get height for check");