Add changes to support the presence of ellipses

The code to scale the coordinates was not considering the case where
ellipses are present in the scene.