Imager::LineTrace::Figure - Result of line trace
use Imager::LineTrace::Figure; my $figure = reverse ( points => [ [0, 0], [1, 0] ], is_closed => 0, value => 1, # Traced value ); print $figure->{type}; # => "Line"
Result object of Imager::LineTracer.
RETURN DATA
Basic Overview
# $figure->{points} is ARRAY reference. foreach my $point (@{$figure_ref->{points}}) { printf( "x = %d, y = %d\n", $point->[0], $point->[1] ); } # If $figure->{is_closed} is 1, end point linked to start point. print $figure->{is_closed}; # $figure->{value} is traced value. print $figure->{value}; # $figure->{type} is one of "Point", "Line", "Polyline" and "Polygon". print $figure->{type};
Copyright (C) neko.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
neko <techno.cat.miau@gmail.com>
To install Imager::LineTrace, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Imager::LineTrace
CPAN shell
perl -MCPAN -e shell install Imager::LineTrace
For more information on module installation, please visit the detailed CPAN module installation guide.