added translate and containsPoint functions.