better handling of rotated entities

This improves the rendering of selection handles for entities that have been rotated.
calculate the bounding box based on the other properties