![]() |
![]()
| ![]() |
![]()
NAMEGeometry::Primitive::Line - A Line DESCRIPTIONGeometry::Primitive::Line represents a straight curve defined by two points. SYNOPSISuse Geometry::Primitive::Line; my $line = Geometry::Primitive::Line->new(); $line->start($point1); $line->end($point2); ATTRIBUTESendSet/Get the end point of the line. startSet/Get the start point of the line. METHODSnewCreates a new Geometry::Primitive::Line contains_pointReturns true if the supplied point is 'on' the line. Accepts either a point object or an x y pair. growDoes nothing, as I'm not sure how. Patches or hints welcome. is_parallel ($other_line)Returns true if the supplied line is parallel to this one. is_perpendicular ($other_line)Returns true if the supplied line is perpendicular to this one. lengthGet the length of the line. point_endGet the end point. Provided for Shape role. point_startGet the start point. Provided for Shape role. scaleDoes nothing at the moment. slopeGet the slope of the line. to_stringGuess! y_interceptReturns the Y intercept of this line. AUTHORCory Watson <gphat@cpan.org> COPYRIGHT & LICENSEYou can redistribute and/or modify this code under the same terms as Perl itself.
|