molfoundry.VertexOverlay#

class molfoundry.VertexOverlay(color=None, label=None, shape=OverlayShape.Circle, radius=None, text_color=None)#

A marker drawn on top of a graph vertex — a colored shape carrying a short label.

Overlays are configured through the printer, not passed per call: register a resolver with GraphPrinter.pushVertexOverlay() that returns a VertexOverlay for the vertices to mark (and None otherwise), just like DGPrinter’s pushVertexColor / pushVertexLabel. Because a DG draws every molecule through its embedded graph printer (dgPrinter.graphPrinter), one resolver annotates a single graph and every DG vertex’s molecule alike.

Parameters:
  • color (str | None) – Fill color of the marker (e.g. an atom-origin color).

  • label (str | int | None) – Text centered in the marker; an int is rendered as its decimal string.

  • shape (OverlayShape) – Marker shape; defaults to OverlayShape.Circle.

  • radius (float | None) – Marker size in layout units (circle radius / square half-extent / polygon circumradius); None uses the drawing default.

  • text_color (str | None) – Label color; None uses a dark default.