1Imager::Handy(3)      User Contributed Perl Documentation     Imager::Handy(3)
2
3
4

NAME

6       Imager::Handy - simple access to common functions
7

SYNOPSIS

9         use Imager ':handy';
10         my $color = NC(255, 0, 0);
11         my $font = NF(1.0, 0, 0);
12

DESCRIPTION

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()
33           Create a new Imager::Color::Float object, supplying any parameters
34           to the new() method.
35
36             my $colorf = NCF(1.0, 0, 0);
37

BUGS

39       NC() can be mostly replaced by supplying the color name or other
40       description directly to the drawing method.
41

AUTHOR

43       Tony Cook <tonyc@cpan.org>
44
45
46
47perl v5.32.1                      2021-01-27                  Imager::Handy(3)
Impressum