Package horizons :: Package util :: Package shapes :: Module point :: Class Point
[hide private]
[frames] | no frames]

Class Point

source code

Shape --+
        |
       Point

Instance Methods [hide private]
 
__init__(self, x, y) source code
 
copy(self) source code
 
to_tuple(self)
Returns point as a tuple
source code
 
center(self)
Returns the center of the point (this makes Point interface more coherent with Rect).
source code
 
offset(self, x_offset, y_offset)
Returns a Point with an offset of x, y relative to this Point.
source code
 
contains(self, point)
For compatibility with Rect
source code
 
__str__(self)
nice representation for debugging purposes
source code
 
__eq__(self, other) source code
 
__add__(self, other) source code
 
__sub__(self, other) source code
 
__hash__(self) source code
 
tuple_iter(self) source code
 
iter_without_border(self) source code
    Inherited from Shape
 
__iter__(self)
Return all coordinates in the shape as points.
source code
 
distance(self, other) source code
 
get_coordinates(self)
Return all coordinates in the shape.
source code
 
get_distance_function(self, other) source code
Method Details [hide private]

center(self)

source code 

Returns the center of the point (this makes Point interface more coherent with Rect).

Decorators:
  • @property

offset(self, x_offset, y_offset)

source code 

Returns a Point with an offset of x, y relative to this Point.

Parameters:
  • x_offset - int relative x-offset of the point to return
  • y_offset - int relative y-offset of the point to return
Returns:
a Point with offset x, y relative to the 'self' Point

tuple_iter(self)

source code 
Overrides: Shape.tuple_iter