-form => circle oval -points => [x1, y1, x2, y2] -subset => all points_outside points_inside lines_outside lines_inside

NAME

Tk::Image::Calculation - Perl extension for graphic calculations

SYNOPSIS

use Tk::Image::Calculation;
my $cal = Tk::Image::Calculation->new();	
my $ref_array_points = $cal->GetPointsInOval(10, 20, 110, 210); 
for(@{$ref_array_points})
	{
	print("x : $_->[0]		y : $y_->[1]\n");
	}
my $ref_array_lines = $cal->GetLinesInOval(10, 20, 110, 210);
for(@{$ref_array_lines})
	{
	print("x1 : $_->[0]	y1 : $_->[1]	x2 : $_->[2]	y2 : $_->[3]\n");
	}

DESCRIPTION

This module calculates points and lines inside or outside from simple graphic objects.

CONSTRUCTOR

my $object = Tk::Image::Calculation->new();
Returns an empty object just for calling the methods.
my $object = Tk::Image::Calculation->new( -points => [$x1, $y1, $x2, $y2], -form => "oval", # or circle -subset => "points_outside, # or points_inside, lines_inside, lines_outside );
Returns an arrayreference blessed as object with lines or points.
my $object = Tk::Image::Calculation->new( -points => [$x1, $y1, $x2, $y2], -form => "circle", # or oval -subset => "all" );
Returns a hashreference blessed as object with the following keys.
	points_outside
	points_inside
	lines_outside
	lines_inside
The values of the keys are arrayreferences with lines or points.

METHODS

Two points are handed over to the functions for Oval and Circle. 
In the following form ($x1, $y1, $x2, $y2).
The first point to the left up and the second point to the right below of a thought rectangle,
in that the graphic object does fitting.
The returned values are array references of points or lines.
Points [x, y]
Lines [x1, y1, x2, y2]
GetPointsOval
Takes over two points as parameters.
Returns a hashreferences with the following keys.
	points_outside 
	points_inside
	lines_outside 
	lines_inside
The values of the keys are arrayreferences with points or lines. 
GetPointsInOval, GetPointsOutOval, GetLinesInOval, GetLinesOutOval
Takes over two points as parameters.
Returns a array reference of Points or Lines inside or outside of the Oval. 
GetPointsCircle
Just the same as GetPointsOval.
GetPointsInCircle, GetPointsOutCircle, GetLinesInCircle, GetLinesOutCircle
Takes over two points as parameters.
Returns a array reference of Points or Lines inside or outside of the Circle. 

EXPORT

None by default.

SEE ALSO

Tk::Image::Cut
http://www.planet-interkom.de/t.knorr/index.html

KEYWORDS

graphic, calculation 

BUGS

Maybe you'll find some. Please let me know.

AUTHOR

Torsten Knorr, <torstenknorr@tiscali.de>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Torsten Knorr

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.9.2 or, at your option, any later version of Perl 5 you may have available.

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 498:

'=item' outside of any '=over'

Around line 523:

You forgot a '=back' before '=head1'

Around line 533:

'=item' outside of any '=over'

Around line 557:

You forgot a '=back' before '=head2'