add path direction and modify stroke interface