]>
Commit | Line | Data |
---|---|---|
d5556805 TC |
1 | =head1 NAME |
2 | ||
3 | Imager::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 | ||
13 | If you use Imager with the C<:handy> import tag, it will export a | |
14 | number 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 | |
24 | Create a new Imager::Color object, supplying any parameters to the | |
25 | new() method. | |
26 | ||
27 | my $color = NC('red'); | |
28 | ||
5715f7c3 | 29 | =item NF() |
d5556805 | 30 | |
5715f7c3 | 31 | =item newfont() |
d5556805 TC |
32 | |
33 | Create a new Imager::Font object, supplying any parameters to the | |
34 | new() method. | |
35 | ||
36 | my $font = NF(file => 'foo.ttf'); | |
37 | ||
5715f7c3 | 38 | =item NCF() |
bd8052a6 | 39 | |
67d441b2 | 40 | Create a new L<Imager::Color::Float> object, supplying any parameters |
e907e913 | 41 | to the new() method. |
bd8052a6 TC |
42 | |
43 | my $colorf = NCF(1.0, 0, 0); | |
44 | ||
d5556805 TC |
45 | =back |
46 | ||
47 | =head1 BUGS | |
48 | ||
49 | NC() can be mostly replaced by supplying the color name or other | |
50 | description directly to the drawing method. | |
51 | ||
52 | =head1 AUTHOR | |
53 | ||
5b480b14 | 54 | Tony Cook <tonyc@cpan.org> |
d5556805 TC |
55 | |
56 | =cut | |
57 |