| 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 |
|
| 18 |
=item NC() |
| 19 |
|
| 20 |
=item newcolor() |
| 21 |
|
| 22 |
=item newcolour() |
| 23 |
|
| 24 |
Create a new Imager::Color object, supplying any parameters to the |
| 25 |
new() method. |
| 26 |
|
| 27 |
my $color = NC('red'); |
| 28 |
|
| 29 |
=item NF() |
| 30 |
|
| 31 |
=item newfont() |
| 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 |
|
| 38 |
=item NCF() |
| 39 |
|
| 40 |
Create a new L<Imager::Color::Float> object, supplying any parameters |
| 41 |
to the new() method. |
| 42 |
|
| 43 |
my $colorf = NCF(1.0, 0, 0); |
| 44 |
|
| 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 |
|
| 54 |
Tony Cook <[email protected]> |
| 55 |
|
| 56 |
=cut |
| 57 |
|