python-igraph API reference

List of all classes, functions and methods in python-igraph

class documentation

Static class, the ancestor of all vertex shape drawer classes.

Custom shapes must implement at least the draw_path method of the class. The method must not stroke or fill, it should just set up the current Cairo path appropriately.

Static Method draw_path Draws the path of the shape on the given Cairo context, without stroking or filling it.
Static Method intersection_point Determines where the shape centered at (center_x, center_y) intersects with a line drawn from (source_x, source_y) to (center_x, center_y).
@staticmethod
def draw_path(ctx, center_x, center_y, width, height=None):

Draws the path of the shape on the given Cairo context, without stroking or filling it.

This method must be overridden in derived classes implementing custom shapes and declared as a static method using staticmethod(...).

Parametersctxthe context to draw on
center_xthe X coordinate of the center of the object
center_ythe Y coordinate of the center of the object
widththe width of the object
heightthe height of the object. If None, equals to the width.
@staticmethod
def intersection_point(center_x, center_y, source_x, source_y, width, height=None):

Determines where the shape centered at (center_x, center_y) intersects with a line drawn from (source_x, source_y) to (center_x, center_y).

Can be overridden in derived classes. Must always be defined as a static method using staticmethod(...)

Parameterscenter_xUndocumented
center_yUndocumented
source_xUndocumented
source_yUndocumented
widththe width of the shape
heightthe height of the shape. If None, defaults to the width
Returnsthe 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
API Documentation for igraph, generated by pydoctor 21.2.2.