added method to change pathstyle.
merge with document updates