improve line number redrawing

it now checks to avoid drawing the line numbers when
the invalid region is not lined up in the X direction
add place-images and place-images/align