1Imager::Handy(3) User Contributed Perl Documentation Imager::Handy(3)
2
3
4
6 Imager::Handy - simple access to common functions
7
9 use Imager ':handy';
10 my $color = NC(255, 0, 0);
11 my $font = NF(1.0, 0, 0);
12
14 If you use Imager with the ":handy" import tag, it will export a number
15 of functions that can shorter your code.
16
17 NC
18 newcolor
19 newcolour
20 Create a new Imager::Color object, supplying any parameters to the
21 new() method.
22
23 my $color = NC('red');
24
25 NF
26 newfont
27 Create a new Imager::Font object, supplying any parameters to the
28 new() method.
29
30 my $font = NF(file => 'foo.ttf');
31
32 NCF Create a new Imager::Color::Font object, supplying any parameter to
33 the new() method.
34
35 my $colorf = NCF(1.0, 0, 0);
36
38 NC() can be mostly replaced by supplying the color name or other
39 description directly to the drawing method.
40
42 Tony Cook <tony@imager.perl.org>
43
44
45
46perl v5.8.8 2008-03-28 Imager::Handy(3)