class_docstr: Abstract class that serves as a base class for anything that
  draws on a Cairo context within a given bounding box.
  
  A subclass of L{AbstractCairoDrawer} is guaranteed to have an
  attribute named C{context} that represents the Cairo context
  to draw on, and an attribute named C{bbox} for the L{BoundingBox}
  of the drawing area.
docstr: Constructs the drawer and associates it to the given
  Cairo context and the given L{BoundingBox}.
  
  @param context: the context on which we will draw
  @param bbox:    the bounding box within which we will draw.
                  Can be anything accepted by the constructor
                  of L{BoundingBox} (i.e., a 2-tuple, a 4-tuple
                  or a L{BoundingBox} object).
docstr_tok: ["Constructs","the","drawer","and","associates","it","to","the","given","Cairo","context","and","the","given","L","{","BoundingBox","}",".","@","param","context",":","the","context","on","which","we","will","draw","@","param","bbox",":","the","bounding","box","within","which","we","will","draw",".","Can","be","anything","accepted","by","the","constructor","of","L","{","BoundingBox","}","(","i.e.",",","a","2-tuple",",","a","4-tuple","or","a","L","{","BoundingBox","}","object",")","."]
code: def __init__(self, context, bbox: BoundingBox or None):
      """Constructs the drawer and associates it to the given
      Cairo context and the given L{BoundingBox}.
  
      @param context: the context on which we will draw
      @param bbox:    the bounding box within which we will draw.
                      Can be anything accepted by the constructor
                      of L{BoundingBox} (i.e., a 2-tuple, a 4-tuple
                      or a L{BoundingBox} object).
      """
      self.context = context
      self._bbox = None  # type: ignore
      # can be set at drawing time
      if bbox is not None:
          self.bbox = bbox
  
file_path: python-igraph/src/igraph/drawing/cairo/base.py
imports: from math import pi
  from typing import Tuple, Union
  from igraph.drawing.baseclasses import AbstractDrawer
  from igraph.drawing.utils import BoundingBox
label_desc: Use image node_id 1 to create a new AbstractCairoDrawer object from inherited base classes: AbstractDrawer with example: obj = AbstractCairoDrawer(context, bbox)