Return a dimension instead of a size when calling getRect on a view

New class dimension, with height, width, x and y fields.