Using location and dimension instead of x,y and width,height