void rect(double x, double y, double w, double h) { addAction((Canvas canvas, Size size) { path2d.rect(x, y, w, h); }); }