m.x and m.y now pay attention to canvas bounds.