Skip to content

Commit

Permalink
minor documentation touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Cook committed Dec 12, 2005
1 parent 5995785 commit 77c0647
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@ Revision history for Perl extension Imager.
- document the utf8 parameter for bounding_box(), has_chars()
Resolves: http://rt.cpan.org/NoAuth/Bug.html?id=13508
- decode the EXIF GPS IFD as well
- minor documentation touchups

=================================================================

Expand Down
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ not commitments.
- multiple examples for writing GIF images.
- name arguments and use those names in the documentation
http://nntp.perl.org/group/perl.perl5.porters/102434
(#1521, #5608, #8231, #11429, #13058)
(#1521, #5608, #8231, #11429, #13058(done))

- have $img->read() act like ($img) = Imager->read_multi() on GIFs (done)

Expand Down
17 changes: 9 additions & 8 deletions lib/Imager/Engines.pod
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ Note: You can still use the transform() function, but the transform2()
function is just as fast and is more likely to be enhanced and
maintained.

$new_img=$img->transform(xexpr=>'x',yexpr=>'y+10*sin((x+y)/10)')

$new_img=$img->transform(xexpr=>'x+0.1*y+5*sin(y/10.0+1.57)',
yexpr=>'y+10*sin((x+y-0.785)/10)')

=head2 transform2

Expand Down Expand Up @@ -101,13 +104,11 @@ supplied a 3 channel image will be created.
The tranformation function is specified using either the expr or
rpnexpr member of the options.

=over

=item Infix expressions
=head3 Infix expressions

You can supply infix expressions to transform 2 with the expr keyword.

$opts{expr} = 'return getp1(w-x, h-y)'
$opts{expr} = 'return getp1(w-x, h-y)'

The 'expression' supplied follows this general grammar:

Expand All @@ -117,14 +118,14 @@ This allows you to simplify your expressions using variables.

A more complex example might be:

$opts{expr} = 'pix = getp1(x,y); return if(value(pix)>0.8,pix*0.8,pix)'
$opts{expr} = 'pix = getp1(x,y); return if(value(pix)>0.8,pix*0.8,pix)'

Currently to use infix expressions you must have the Parse::RecDescent
Currently to use infix expressions you must have the L<Parse::RecDescent>
module installed (available from CPAN). There is also what might be a
significant delay the first time you run the infix expression parser
due to the compilation of the expression grammar.

=item Postfix expressions
=head3 Postfix expressions

You can supply postfix or reverse-polish notation expressions to
transform2() through the rpnexpr keyword.
Expand All @@ -141,7 +142,7 @@ An example equivalent to the infix expression above:

$opts{rpnexpr} = 'x y getp1 !pix @pix value 0.8 gt @pix 0.8 * @pix ifp'

=back
=head3 Operators

transform2() has a fairly rich range of operators.

Expand Down
2 changes: 1 addition & 1 deletion lib/Imager/Font.pm
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ Returns a list specifying the bounds of the drawn text.
=item dpi(dpi=>$dpi)
Set retrieve the spatial resolution of the image in dots per inch.
Set or retrieve the spatial resolution of the image in dots per inch.
The default is 72 dpi.
This isn't implemented for all font types yet.
Expand Down

0 comments on commit 77c0647

Please sign in to comment.