Got the getLines routine working for horizontal and vertical lines