https://issues.apache.org/ooo/show_bug.cgi?id=123379
--- Comment #13 from Regina Henschel <[email protected]> --- (In reply to Armin Le Grand from comment #10) > Created attachment 81733 [details] > Patch to solve various marker problems > > ALG: This patch corrects start/mid/end marker usage and marker orientations The logic in line 932 if(!bIsFirstMarker && (nPointIndex || bSubPolygonPathIsClosed)) looks wrong to me. For the first point of a closed path you get if(!true && (false || true)) which result in false and skips the 'then' case, and so has (0.0,0.0) for the incoming tangent vector. But it has to be the tangent of the last path segment. You see the error in the test files. For closed paths the green and blue marker should be diagonal and not in edge direction. I would combine it with bug 123401. Idea: Determine how many steps back are allowed at the most, which depends on index and on whether the path is closed or not. Step back till a non-zero-length path segment is found or max step count exceeded. If a non-zero-length path segment exists, its tangent vector is aPrev. Determine how many steps forward are allowed at the most. Step forward till a non-zero-length path segment is found or max step count exceeded. If a non-zero-length path segment exists, its tangent vector is aCurrent. Needs atan2 a domain check? In http://www.cplusplus.com/reference/cmath/atan2/ I read "If both arguments passed are zero, a domain error occurs." But I could not force a problem using zero-length segments. -- You are receiving this mail because: You are on the CC list for the bug. You are watching all bug changes.
