static AutoCloseable tempSetStroke(Graphics2D g, Stroke s) { Stroke oldStroke = g.getStroke(); g.setStroke(s); ret -> g.setStroke(oldStroke); }