halfwidth and halfheight calculated in object creation