update polyline api, offset tool as base class