give 5 pixels tolerance for x0-and-y0-out-of-boundaries-check