change line API and add area support