Geometry::Primitive::Line - A Line
Geometry::Primitive::Line represents a straight curve defined by two points.
use Geometry::Primitive::Line;
my $line = Geometry::Primitive::Line->new();
$line->start($point1);
$line->end($point2);
Set/Get the end point of the line.
Set/Get the start point of the line.
Creates a new Geometry::Primitive::Line
Returns true if the supplied point is 'on' the line. Accepts either a point
object or an x y pair.
Does nothing, as I'm not sure how. Patches or hints welcome.
Returns true if the supplied line is parallel to this one.
Returns true if the supplied line is perpendicular to this one.
Get the length of the line.
Get the end point. Provided for Shape role.
Get the start point. Provided for Shape role.
Does nothing at the moment.
Get the slope of the line.
Returns the Y intercept of this line.
Cory Watson <gphat@cpan.org>
You can redistribute and/or modify this code under the same terms as Perl
itself.