python-igraph API reference

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

class documentation

class PolygonDrawer(AbstractCairoDrawer):

View In Hierarchy

Class that is used to draw polygons.

The corner points of the polygon can be set by the points property of the drawer, or passed at construction time. Most drawing methods in this class also have an extra points argument that can be used to override the set of points in the points property.

Method __init__ Constructs a new polygon drawer that draws on the given Cairo context.
Instance Variable points Undocumented
Method draw_path Sets up a Cairo path for the outline of a polygon on the given Cairo context.
Method draw Draws the polygon using the current stroke of the Cairo context.

Inherited from AbstractCairoDrawer:

Instance Variable context Undocumented
Property bbox The bounding box of the drawing area where this drawer will draw.
Method bbox.setter Sets the bounding box of the drawing area where this drawer will draw.
Instance Variable _bbox Undocumented
Method _mark_point Marks the given point with a small circle on the canvas. Used primarily for debugging purposes.
def __init__(self, context, bbox=(1, 1), points=[]):

Constructs a new polygon drawer that draws on the given Cairo context.

Parameterscontextthe Cairo context to draw on
bboxignored, leave it at its default value
pointsthe list of corner points
points =

Undocumented

def draw_path(self, points=None, corner_radius=0):

Sets up a Cairo path for the outline of a polygon on the given Cairo context.

Parameterspointsthe coordinates of the corners of the polygon, in clockwise or counter-clockwise order, or None if we are about to use the points property of the class.
corner_radiusif zero, an ordinary polygon will be drawn. If positive, the corners of the polygon will be rounded with the given radius.
def draw(self, points=None):

Draws the polygon using the current stroke of the Cairo context.

Parameterspointsthe coordinates of the corners of the polygon, in clockwise or counter-clockwise order, or None if we are about to use the points property of the class.
API Documentation for python-igraph, generated by pydoctor 21.2.2 at 2021-03-26 11:21:53.