internal swift cgrect helpers to private