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