Implemented drawLine() function.