Module pinky :: Class Line

Class Line

object --+    
         |    
     Shape --+
             |
            Line

A line.

Instance Methods
 
__init__(self, x1, y1, x2, y2)
Initialize a line from two points.
 
__repr__(self)
repr(x)
 
transform(self, matrix)
Get a transformed copy of the shape.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
  p1
The first point.
  p2
The second point.
  area
The area of a line is always zero.
  centroid
The center point of the line.
  bounding_box
The bounding box of the shape.

Inherited from object: __class__

Method Details

__init__(self, x1, y1, x2, y2)
(Constructor)

 

Initialize a line from two points.

Overrides: object.__init__

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

transform(self, matrix)

 

Get a transformed copy of the shape.

Overrides: Shape.transform
(inherited documentation)

Property Details

p1

The first point.

Get Method:
unreachable.p1(self) - The first point.

p2

The second point.

Get Method:
unreachable.p2(self) - The second point.

area

The area of a line is always zero.

Get Method:
unreachable.area(self) - The area of a line is always zero.

centroid

The center point of the line.

Get Method:
unreachable.centroid(self) - The center point of the line.

bounding_box

The bounding box of the shape.

Get Method:
unreachable.bounding_box(self)