sclass LineWithColor implements RenderableWithHints { Pt a, b; RGB color; int width = 14; *() {} *(Pt *a, Pt *b, RGB *color) {} public void renderOn(Graphics2D g, int w, int h) { drawRoundEdgeLine(g, a, b, toColor(color), width); } public void renderHints(Graphics2D g, int w, int h) { setColor(hintColor()); fillRect(g, a.x, a.y, 1, 1); fillRect(g, b.x, b.y, 1, 1); } }