vecrec.Shape

class vecrec.Shape[source]

Bases: object

Provide an interface for custom shape classes to interact with the rectangle class.

For example, rectangles can be instantiated from shapes and can test for collisions against shapes. The interface is very simple, requiring only four methods to be redefined. These methods specify the outer dimensions, i.e. the bounding rectangle, of the shape subclass.

Public Data Attributes:

bottom

left

width

height

Public Methods:

get_bottom()

get_left()

get_width()

get_height()


property bottom
get_bottom()[source]
get_height()[source]
get_left()[source]
get_width()[source]
property height
property left
property width