Module Drawing :: Class BBox
[hide private]
[frames] | no frames]

Class BBox

source code

object --+
         |
        BBox

BBox is a utility class which encapsulates a bounding box.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
update(self, x, y)
Make sure the bounding box is big enough to include the given x,y point.
source code
 
updateBBox(self, bbox)
Make sure the bounding box is big enough to include the given bounding box.
source code
 
updateBorder(self, linewidth)
Keep track of the largest linewidth we've seen.
source code
 
__nonzero__(self)
Return True if there's been at least one update to this BBox.
source code
 
__str__(self)
str(x)
source code
 
bbox(self)
Return a bounding box (as a 4-tuple) guaranteed to encompass this entire object.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Instance Variables [hide private]
  border
We can also track maximum linewidths within the bounding box, and expand it by the appropriate amount.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

updateBBox(self, bbox)

source code 
Make sure the bounding box is big enough to include the given bounding box. Note that the border is not increased by this method; instead the given bounding box is expanded to include its border before being added to this.