convert brush.x and brush.y to axis.x and axis.y