static void drawLine(BufferedImage image, int x1, int y1, int x2, int y2, Color color) { drawLine(imageGraphics(image), x1, y1, x2, y2, color); } static void drawLine(Graphics2D g, int x1, int y1, int x2, int y2, Color color) { g.setColor(color); g.drawLine(x1, y1, x2, y2); } static void drawLine(BufferedImage image, Pt a, Pt b, Color color) { drawLine(imageGraphics(image), a, b, color); } static void drawLine(Graphics2D g, Pt a, Pt b, Color color) { drawLine(g, a.x, a.y, b.x, b.y, color); } ifclass DoubleEdge import java.awt.geom.Line2D; static void drawLine(Graphics2D g, DoubleEdge e, Color color) { if (e == null) ret; g.setColor(color); g.draw(new Line2D.Double(e.x1(), e.y1(), e.x2(), e.y2())); } endif