Geometry::Primitive::Line(3pm) User Contributed Perl Documentation Geometry::Primitive::Line(3pm)NAME
Geometry::Primitive::Line - A Line
DESCRIPTION
Geometry::Primitive::Line represents a straight curve defined by two points.
SYNOPSIS
use Geometry::Primitive::Line;
my $line = Geometry::Primitive::Line->new();
$line->start($point1);
$line->end($point2);
ATTRIBUTES
end
Set/Get the end point of the line.
start
Set/Get the start point of the line.
METHODS
new
Creates a new Geometry::Primitive::Line
contains_point
Returns true if the supplied point is 'on' the line. Accepts either a point object or an x y pair.
grow
Does 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.
length
Get the length of the line.
point_end
Get the end point. Provided for Shape role.
point_start
Get the start point. Provided for Shape role.
scale
Does nothing at the moment.
slope
Get the slope of the line.
to_string
Guess!
y_intercept
Returns the Y intercept of this line.
AUTHOR
Cory Watson <gphat@cpan.org>
COPYRIGHT & LICENSE
You can redistribute and/or modify this code under the same terms as Perl itself.
perl v5.10.1 2010-01-10 Geometry::Primitive::Line(3pm)
Check Out this Related Man Page
Geometry::Primitive(3pm) User Contributed Perl Documentation Geometry::Primitive(3pm)NAME
Geometry::Primitive - Primitive Geometry Entities
SYNOPSIS
Geometry::Primitive is a device and library agnostic system for representing geometric entities such as points, lines and shapes. It
provides simple objects and many convenience methods you would expect from a simple geometry library.
use Geometry::Primitive::Point;
my $foo = Geometry::Primitive::Point->new(x => 1, y => 3);
...
DISCLAIMER
I'm not a math guy. I hate math. I will likely learn a lot in the process of making this library. If you are a math person you will
probably look at this and find many things missing or wrong. Patches are encouraged. I will likely find that I've done something completely
wrong having taken geometry over 10 years ago. C'est la vie.
ENTITIES
Arc
Bezier
Circle
Ellipse
Line
Point
Polygon
Rectangle
SERIALIZATON
All of the entities in this library support serialization via MooseX::Storage. This is primarily to support serialization in consumers of
this library, but may be useful for other purposes. All classes are set to JSON format and File IO.
AUTHOR
Cory Watson, "<gphat@cpan.org>"
ACKNOWLEDGEMENTS
Many of the ideas here come from my experience using the Cairo library.
BUGS
Please report any bugs or feature requests to "bug-geometry-primitive at rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Geometry-Primitive>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
COPYRIGHT & LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2010-01-10 Geometry::Primitive(3pm)
hi
i can't convert a string to a new line character via this command:
sed -e "s/<string>/\n/g" source > target
all it does is change <string> to n. is there anything wrong? (7 Replies)
Hi, I want to make a new line between for eg: 0102030405 to make it look like:
01
02
03
04
05
by using sed commands. I'm just wondering how would I do this?
p.s i'm new to this unix programming. (7 Replies)
Hi,
I want to get a Line count of a file and append that at the end of the file. The Line count should not include the Headers :
------------------
COL1,COL2,COL3
123,abc,011
111,abd,0212
Record Count: 2
-------------------
Thanks. (7 Replies)
Hi,
I have a file from which i need to extract data between two constant strings.
The data looks like this :
Line 1 SUN> read db @cmpd unit 60
Line 2 Parameter: CMPD -> "C00071"
Line 3
Line 4 SUN> generate
Line 5 tabint>ERROR: (Variable data)
The data i need to extract is... (11 Replies)
Now i'm up to making a script from which you could activate all Linux services without being an expert. It's gonna be a powerful tool, I'll look forward to make it able to change the port which the service is assigned to. But I need some help, post some script to activate services and I'll fusion... (8 Replies)
If i have text file how do i find the line with the nth occurance of a certain string, so in example below i want line number of 3rd occurance of COD1 which should be line 7
COD1
COD2
COD2
COD1
COD2
COD2
COD1 (7 Replies)
Hi Folks,
I have one file which contains the data like below.
gggsdvrwdtydjnnc%vhdskl;jf;whjfuyijfnv,m%jkgsjkfsjkjdlkl%gjksdhfljkfjkj%
I want to replace % to the Line feed. I mean the result should be like below.
gggsdvrwdtydjnnc
vhdskl;jf;whjfuyijfnv,m
jkgsjkfsjkjdlkl... (12 Replies)
Hi
I have a csv file in below format
First Line=1
Second Line=2
And the third Line=3
Now comes the fourth Line=4
I want to insert spaces so that the output would be
First Line=1
Second Line=2
And the third Line=3
Now comes the fourth Line=4
Can anyone help me do... (10 Replies)
hi there ,
i m new to unix , i d like to ask how can a get only even numbered lines matches with the word i search from txt file
for example :
3461:1.D. The copyright laws of the place where you are located also govern
3471:1.E. Unless you have removed all references to Project... (17 Replies)
Hi! I'm trying to assign line numbers to each line of the file
for example consider the following..
The contents of the input file are
hello how are you?
I'm fine.
How about you?
I'm trying to get the following output..
1 hello how are you?
2 I'm fine.
3 How about you? ... (8 Replies)
Hello evryone,
I am looking for a way to print x line above and x line below ...
The idea is : I've got a little script that I am trying to make it universal to read debug log file.
I search for specific error value ( ERROR, Failed, NOK) and so on..., but most of the time... (7 Replies)
Bash Macosx 10.9
I have a txt file formatted as follows:
filepath1,countryX
filepath2,countryY
filepath3,countryX
...etc
How can I read this line by line? Esentially I want to read filepath1 and run a command based on it's correlation with the country on the same line, then move onto... (8 Replies)
I have a file
Line 1 a
Line 22
Line 33
Line 1 b
Line 22
Line 1 c
Line 4
Line 5
I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output.
... (21 Replies)
Hi all,
I am fairly new to UNIX and I was wondering if you could provide me with some help! Lets say i have a file as below :
Line 1
Line 2
Line 3
ABC|12|4|2
Now the number 4 in bold, this number will represent the number of row there is in the file excluding the header and footer... (10 Replies)
Hello,
Can someone please share a Simple AWK command to append Carriage Return & Line Feed to the end of the file, If the Carriage Return & Line Feed does not exist !
Thanks (16 Replies)