masks path : fix border direction at sharp corner