Unit tested calcVisualOffset.