Universalize API for line drawing