static Pt centerOfDimension(Dimension d) { ret d == null ? null : new Pt(d.width/2, d.height/2); }