implement GraphPainter, replace graph and multigraph drawings