Package wx :: Package lib :: Package floatcanvas :: Package Utilities :: Module BBox :: Class BBox
[frames | no frames]

Type BBox

object --+    
         |    
   ndarray --+
             |
            BBox


A Bounding Box object:

Takes Data as an array. Data is any python sequence that can be turned into a 2x2 numpy array of floats:

[[MinX, MinY ],
[MaxX, MaxY ]]

It is a subclass of numpy.ndarray, so for the most part it can be used as an array, and arrays that fit the above description can be used in its place.

Usually created by the factory functions:

asBBox

and

fromPoints


Method Summary
  __eq__(self, BB)
__eq__(BB) The equality operator
  __new__(subtype, data)
Takes Data as an array. (Static method)
  Inside(self, BB)
Inside(BB):
  IsNull(self)
  Merge(self, BB)
Joins this bounding box with the one passed in, maybe making this one bigger
  Overlaps(self, BB)
Overlap(BB):

Property Summary
  Center
  Height
  Width

Class Variable Summary

Instance Method Details

__eq__(self, BB)
(Equality operator)

__eq__(BB) The equality operator

A == B if and only if all the entries are the same

Overrides:
numpy.ndarray.__eq__

Inside(self, BB)

Inside(BB):

Tests if the given Bounding Box is entirely inside this one.

Returns True if it is entirely inside, or touching the border.

Returns False otherwise

Merge(self, BB)

Joins this bounding box with the one passed in, maybe making this one bigger

Overlaps(self, BB)

Overlap(BB):

Tests if the given Bounding Box overlaps with this one. Returns True is the Bounding boxes overlap, False otherwise If they are just touching, returns True


Static Method Details

__new__(subtype, data)

Takes Data as an array. Data is any python sequence that can be turned into a 2x2 numpy array of floats:

[[MinX, MinY ], [MaxX, MaxY ]]

You don't usually call this directly. BBox objects are created with the factory functions:

asBBox

and

fromPoints

Overrides:
numpy.ndarray.__new__

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:55:09 2009 http://epydoc.sf.net