python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Package drawing :: Module utils :: Class BoundingBox
[hide private]

Class BoundingBox

source code

object --+    
         |    
 Rectangle --+
             |
            BoundingBox

Class representing a bounding box (a rectangular area) that encloses some objects.

Instance Methods [hide private]
 
__ior__(self, other)
Replaces this bounding box with the union of itself and another.
source code
 
__or__(self, other)
Takes the union of this bounding box with another.
source code

Inherited from Rectangle: __and__, __bool__, __eq__, __hash__, __init__, __ne__, __nonzero__, __repr__, contract, expand, intersection, isdisjoint, isempty, translate, union

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

Properties [hide private]

Inherited from Rectangle: bottom, coords, height, left, midx, midy, right, shape, top, width

Inherited from Rectangle (private): _bottom, _left, _right, _top

Inherited from object: __class__

Method Details [hide private]

__ior__(self, other)

source code 

Replaces this bounding box with the union of itself and another.

Example:

   >>> box1 = BoundingBox(10, 20, 50, 60)
   >>> box2 = BoundingBox(70, 40, 100, 90)
   >>> box1 |= box2
   >>> print(box1)
   BoundingBox(10.0, 20.0, 100.0, 90.0)
Overrides: Rectangle.__ior__

__or__(self, other)
(Or operator)

source code 

Takes the union of this bounding box with another.

The result is a bounding box which encloses both bounding boxes.

Example:

   >>> box1 = BoundingBox(10, 20, 50, 60)
   >>> box2 = BoundingBox(70, 40, 100, 90)
   >>> box1 | box2
   BoundingBox(10.0, 20.0, 100.0, 90.0)
Overrides: Rectangle.union

   Home       Trees       Indices       Help