python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Package drawing :: Module shapes :: Class RectangleDrawer
[hide private]

Class RectangleDrawer

source code

 object --+    
          |    
ShapeDrawer --+
              |
             RectangleDrawer

Static class which draws rectangular vertices

Instance Methods [hide private]

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

Static Methods [hide private]
 
draw_path(ctx, center_x, center_y, width, height=None)
Draws a rectangle-shaped path on the Cairo context without stroking or filling it.
source code
 
intersection_point(center_x, center_y, source_x, source_y, width, height=None)
Determines where the rectangle centered at (center_x, center_y) having the given width and height intersects with a line drawn from (source_x, source_y) to (center_x, center_y).
source code
Class Variables [hide private]
  names = 'rectangle rect rectangular square box'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

draw_path(ctx, center_x, center_y, width, height=None)
Static Method

source code 

Draws a rectangle-shaped path on the Cairo context without stroking or filling it.

Parameters:
  • ctx - the context to draw on
  • center_x - the X coordinate of the center of the object
  • center_y - the Y coordinate of the center of the object
  • width - the width of the object
  • height - the height of the object. If None, equals to the width.
Overrides: ShapeDrawer.draw_path

See Also: ShapeDrawer.draw_path

intersection_point(center_x, center_y, source_x, source_y, width, height=None)
Static Method

source code 

Determines where the rectangle centered at (center_x, center_y) having the given width and height intersects with a line drawn from (source_x, source_y) to (center_x, center_y).

Parameters:
  • width - the width of the shape
  • height - the height of the shape. If None, defaults to the width
Returns:
the intersection point (the closest to (source_x, source_y) if there are more than one) or (center_x, center_y) if there is no intersection
Overrides: ShapeDrawer.intersection_point

See Also: ShapeDrawer.intersection_point


   Home       Trees       Indices       Help