python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Package drawing :: Module vertex :: Class DefaultVertexDrawer
[hide private]

Class DefaultVertexDrawer

source code

                 object --+            
                          |            
 baseclasses.AbstractDrawer --+        
                              |        
           AbstractVertexDrawer --+    
                                  |    
                 object --+       |    
                          |       |    
 baseclasses.AbstractDrawer --+   |    
                              |   |    
baseclasses.AbstractCairoDrawer --+    
                                  |    
          AbstractCairoVertexDrawer --+
                                      |
                                     DefaultVertexDrawer

The default vertex drawer implementation of igraph.

Instance Methods [hide private]
 
__init__(self, context, bbox, palette, layout)
Constructs the vertex drawer and associates it to the given Cairo context and the given BoundingBox.
source code
 
_construct_visual_vertex_builder(self) source code
 
draw(self, visual_vertex, vertex, coords)
Draws the given vertex.
source code

Inherited from baseclasses.AbstractCairoDrawer (private): _mark_point

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

Properties [hide private]

Inherited from baseclasses.AbstractCairoDrawer: bbox

Inherited from object: __class__

Method Details [hide private]

__init__(self, context, bbox, palette, layout)
(Constructor)

source code 

Constructs the vertex drawer and associates it to the given Cairo context and the given BoundingBox.

Parameters:
  • context - the context on which we will draw
  • bbox - the bounding box within which we will draw. Can be anything accepted by the constructor of BoundingBox (i.e., a 2-tuple, a 4-tuple or a BoundingBox object).
  • palette - the palette that can be used to map integer color indices to colors when drawing vertices
  • layout - the layout of the vertices in the graph being drawn
Overrides: object.__init__
(inherited documentation)

draw(self, visual_vertex, vertex, coords)

source code 

Draws the given vertex.

Parameters:
  • visual_vertex - object specifying the visual properties of the vertex. Its structure is defined by the VisualVertexBuilder of the DefaultGraphDrawer; see its source code.
  • vertex - the raw igraph vertex being drawn
  • coords - the X and Y coordinates of the vertex as specified by the layout algorithm, scaled into the bounding box.
Overrides: baseclasses.AbstractDrawer.draw
(inherited documentation)

   Home       Trees       Indices       Help