Re: [svgwg] stroke-linecap and markers (#798)

I would be OK with the shortening applying only to the last segment of the path. I'm trying to avoid complicated SVG for simple cases such as straight dimension lines. Cases that have segments shorter than the width are not simple and probably need more thought placed into markers.

Calculating the length of the path doesn't really work if the width of the line is changes with the style. That means the dash-offset must also change. And what happens if the user wants to make a dashed line with a marker. Now the user must solve some simultaneous equations.

The user could also make a clip region that has cutouts where the markers go. Draw the line using the clip region. Then redraw the line with opacity 0 but with the markers rendered. But if I scale the line width, then I must also scale the cutouts.

The simple solution is have a line cap that doesn't quite make it to the end point. It would cover the common cases.

-- 
GitHub Notification of comment by GLRoylance
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/798#issuecomment-631693538 using your GitHub account

Received on Wednesday, 20 May 2020 19:57:55 UTC