update adjustDia to return a transformation, not just a scale factor

also add renderDiaT which returns a transformation (for use by end
users, e.g. to convert output coordinates back into local coordinates)