static void drawRoundEdgeLine(BufferedImage image, int x1, int y1, int x2, int y2, Color color, float width) { Graphics2D g = imageGraphics(image); g.setColor(color); g.setStroke(new BasicStroke(width, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)); g.drawLine(x1, y1, x2, y2); g.dispose(); } static void drawRoundEdgeLine(BufferedImage image, Pt a, Pt b, Color color, float width) { drawRoundEdgeLine(image, a.x, a.y, b.x, b.y, color, width); }