class_docstr: Class that draws text on a Cairo context.
  
  This class supports multi-line text unlike the original Cairo text
  drawing methods.
class_docstr_tok: ["Class","that","draws","text","on","a","Cairo","context",".","This","class","supports","multi-line","text","unlike","the","original","Cairo","text","drawing","methods","."]
docstr: Constructs a new instance that will draw the given C{text} on
  the given Cairo C{context}.
docstr_tok: ["Constructs","a","new","instance","that","will","draw","the","given","C","{","text","}","on","the","given","Cairo","C","{","context","}","."]
code: def __init__(
      self, context, text="", halign="center", valign="center"
  ):
      """Constructs a new instance that will draw the given C{text} on
      the given Cairo C{context}.
      """
      super().__init__(context, (0, 0))
      self.text = text
      self.halign = halign
      self.valign = valign
  
file_path: python-igraph/src/igraph/drawing/cairo/text.py
imports: import re
  from warnings import warn
  from igraph.drawing.cairo.base import AbstractCairoDrawer
label_desc: Use image node_id 1 to create a new CairoTextDrawer object from inherited base classes: AbstractCairoDrawer with example: obj = CairoTextDrawer(context, text, halign, valign)