Updated line drawing method.