Added an option to invert the orders of lines.