The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Imager::LineTrace::Figure - Result of line trace

SYNOPSIS

    use Imager::LineTrace::Figure;

    my $figure = reverse (
        points    => [ [0, 0], [1, 0] ],
        is_closed => 0,
        value     => 1, # Traced value
    );

    print $figure->{type}; # => "Line"

DESCRIPTION

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};

LICENSE

Copyright (C) neko.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

neko <techno.cat.miau@gmail.com>