Fix for viewport scaling.

The transform scaling was assuming that the transform translate always pointed
to the smallest point in the bounding box, but that isn’t necessarily true.