correct the type of the im_decode_exif() data parameter
[imager.git] / Mandelbrot / Mandelbrot.pm
CommitLineData
92bda632
TC
1package Imager::Filter::Mandelbrot;
2use strict;
3use Imager;
4use vars qw($VERSION @ISA);
5
6BEGIN {
ce2d9ae2 7 $VERSION = "0.04";
92bda632 8
a5919365
TC
9 require XSLoader;
10 XSLoader::load('Imager::Filter::Mandelbrot', $VERSION);
92bda632
TC
11}
12
13sub _mandelbrot {
14 my %hsh = @_;
15
16 mandelbrot($hsh{image}, $hsh{minx}, $hsh{miny}, $hsh{maxx}, $hsh{maxy}, $hsh{maxiter});
17}
18
19my %defaults =
20 (
21 minx => -2.5,
22 maxx => 1.5,
23 miny => -1.5,
24 maxy => 1.5,
25 maxiter => 256,
26 );
27
28my @callseq = qw/image minx miny maxx maxy maxiter/;
29
30Imager->register_filter(type=>'mandelbrot',
31 callsub => \&_mandelbrot,
32 defaults => \%defaults,
33 callseq => \@callseq);
34
351;
3d51355f
TC
36
37__END__
38
39=head1 NAME
40
41Imager::Filter::Mandelbrot - filter that renders the Mandelbrot set.
42
43=head1 SYNOPSIS
44
45 use Imager;
46 use Imager::Filter::Mandelbrot;
47
48 $img->filter(type=>'mandelbrot', ...);
49
50=head1 DESCRIPTION
51
5715f7c3
TC
52This is a expansion of the C<mandelbrot> dynamically loadable filter
53provided in C<dynfilt> in previous releases of Imager.
3d51355f
TC
54
55Valid filter parameters are:
56
57=over
58
59=item *
60
5715f7c3 61C<minx>, C<maxx> - the range of x values to render. Defaults: -2.5, 1.5.
3d51355f
TC
62
63=item *
64
5715f7c3 65C<miny>, C<maxy> - the range of y values to render. Defaults: -1.5, 1.5
3d51355f
TC
66
67=item *
68
5715f7c3
TC
69C<maxiter> - the maximum number of iterations to perform when checking
70if the sequence tend towards infinity.
3d51355f
TC
71
72=back
73
74=head1 AUTHOR
75
76Original by Arnar M. Hrafnkelsson.
77
5b480b14 78Adapted and expanded by Tony Cook <tonyc@cpan.org>
3d51355f
TC
79
80=head1 SEE ALSO
81
82Imager, Imager::Filters.
83
84=cut