]> git.imager.perl.org - imager.git/blame - lib/Imager/Handy.pod
he unpack code for ICO/CUR file handling could extend 32-bit unsigned values to 64...
[imager.git] / lib / Imager / Handy.pod
CommitLineData
d5556805
TC
1=head1 NAME
2
3Imager::Handy - simple access to common functions
4
5=head1 SYNOPSIS
6
7 use Imager ':handy';
8 my $color = NC(255, 0, 0);
9 my $font = NF(1.0, 0, 0);
10
11=head1 DESCRIPTION
12
13If you use Imager with the C<:handy> import tag, it will export a
14number of functions that can shorter your code.
15
16=over
17
5715f7c3 18=item NC()
d5556805 19
5715f7c3 20=item newcolor()
d5556805 21
5715f7c3 22=item newcolour()
d5556805
TC
23
24Create a new Imager::Color object, supplying any parameters to the
25new() method.
26
27 my $color = NC('red');
28
5715f7c3 29=item NF()
d5556805 30
5715f7c3 31=item newfont()
d5556805
TC
32
33Create a new Imager::Font object, supplying any parameters to the
34new() method.
35
36 my $font = NF(file => 'foo.ttf');
37
5715f7c3 38=item NCF()
bd8052a6 39
67d441b2 40Create a new L<Imager::Color::Float> object, supplying any parameters
e907e913 41to the new() method.
bd8052a6
TC
42
43 my $colorf = NCF(1.0, 0, 0);
44
d5556805
TC
45=back
46
47=head1 BUGS
48
49NC() can be mostly replaced by supplying the color name or other
50description directly to the drawing method.
51
52=head1 AUTHOR
53
5b480b14 54Tony Cook <tonyc@cpan.org>
d5556805
TC
55
56=cut
57