# ``igraph`.`drawing`.`cairo`.`base`.`AbstractCairoDrawer``

class documentation

`class AbstractCairoDrawer(AbstractDrawer): (source)`

Known subclasses: `igraph.drawing.cairo.coord.CoordinateSystem`, `igraph.drawing.cairo.dendrogram.CairoDendrogramDrawer`, `igraph.drawing.cairo.graph.AbstractCairoGraphDrawer`, `igraph.drawing.cairo.histogram.CairoHistogramDrawer`, `igraph.drawing.cairo.matrix.CairoMatrixDrawer`, `igraph.drawing.cairo.palette.CairoPaletteDrawer`, `igraph.drawing.cairo.polygon.CairoPolygonDrawer`, `igraph.drawing.cairo.text.CairoTextDrawer`, `igraph.drawing.cairo.vertex.AbstractCairoVertexDrawer`

Constructor: `AbstractCairoDrawer(context, bbox)`

View In Hierarchy

Abstract class that serves as a base class for anything that draws on a Cairo context within a given bounding box.

A subclass of `AbstractCairoDrawer` is guaranteed to have an attribute named `context` that represents the Cairo context to draw on, and an attribute named `bbox` for the `BoundingBox` of the drawing area.

Method | `__init__` | Constructs the drawer and associates it to the given Cairo context and the given `BoundingBox`.
Method | `bbox.setter` | Sets the bounding box of the drawing area where this drawer will draw.
Instance Variable | `context` | Undocumented
Property | `bbox` | The bounding box of the drawing area where this drawer will draw.
Method | `_mark_point` | Marks the given point with a small circle on the canvas. Used primarily for debugging purposes.
Instance Variable | `_bbox` | Undocumented

Inherited from `AbstractDrawer`:

Method | `draw` | Abstract method, must be implemented in derived classes.

def __init__(self, context, bbox: `BoundingBox or None`): (source)
overridden in `igraph.drawing.cairo.coord.DescartesCoordinateSystem`, `igraph.drawing.cairo.dendrogram.CairoDendrogramDrawer`, `igraph.drawing.cairo.graph.AbstractCairoGraphDrawer`, `igraph.drawing.cairo.histogram.CairoHistogramDrawer`, `igraph.drawing.cairo.matrix.CairoMatrixDrawer`, `igraph.drawing.cairo.palette.CairoPaletteDrawer`, `igraph.drawing.cairo.polygon.CairoPolygonDrawer`, `igraph.drawing.cairo.text.CairoTextDrawer`, `igraph.drawing.cairo.vertex.AbstractCairoVertexDrawer`

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

Parameters
context | the context on which we will draw
bbox:`BoundingBox or None` | 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).

@bbox.setter
def bbox(self, bbox): (source)
overridden in `igraph.drawing.cairo.coord.DescartesCoordinateSystem`

Sets the bounding box of the drawing area where this drawer will draw.

context = (source)

Undocumented

@property
bbox: `BoundingBox` = (source)
overridden in `igraph.drawing.cairo.coord.DescartesCoordinateSystem`, `igraph.drawing.cairo.graph.CairoGraphDrawer`, `igraph.drawing.cairo.histogram.CairoHistogramDrawer`, `igraph.drawing.cairo.matrix.CairoMatrixDrawer`, `igraph.drawing.cairo.palette.CairoPaletteDrawer`

The bounding box of the drawing area where this drawer will draw.

def _mark_point(self, x: `float`, y: `float`, color: `int | tuple[float, ...]` = 0, size: `float` = 4): (source)

Marks the given point with a small circle on the canvas. Used primarily for debugging purposes.

Parameters
x:`float` | the X coordinate of the point to mark
y:`float` | the Y coordinate of the point to mark
color:`int | tuple[float, ...]` | the color of the marker. It can be a 3-tuple (RGB components, alpha=0.5), a 4-tuple (RGBA components) or an index where zero means red, 1 means green, 2 means blue and so on.
size:`float` | the diameter of the marker.

_bbox: `BoundingBox` = (source)
overridden in `igraph.drawing.cairo.coord.DescartesCoordinateSystem`

Undocumented