Do not cross canvas borders when drawing.