New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a stroke-dashcap option to LineSymbolizer. #3982
Comments
That would be great, @StyXman . I see that you already opened this issue in #3849. Can you please close it? Concerning implementation, I can offer some basic help. There is a pipeline of operations which geometry goes through. These operations convert a stream of vertices of a geometry to another stream of vertices. Here is a list of operations for LineSymbolizer: mapnik/src/agg/process_line_symbolizer.cpp Lines 187 to 191 in 2929c4a
The last two from the list are dash and stroke converters. Dash converter splits line to dashes - many short lines. Stroke converter converts lines to polygons with given parameters (such as Your target is therefore the stroke converter. I would try to extend it or rather introduce specialized stroke converter for dashed lines to keep original code efficient. The dash converter and the stroke converter are part of AGG library as templates |
Yeah, when I was filling the info for the issue I had a déjà-vu sensation :) Thanks for the pointers. I'll try to do it, but I really don't have much time. |
It took me a long time to have the time to look at this with time. Could you explain how does the rendering machinery work? From what I read, the converters are instantiated, then vertexes are added with What I'm thinking of is to extend the dasher to mark the first and last segments of the original line, and the stroker to use that to use one cap or another, but I can't see how the data is fed to the converters, and how the converters modify the data so it's fed to the following one. I think I see the hooks, but I need to understand the machinery that makes them tick, and AGG's site is not really explicit about it. i didn't manage to extract that info form the example you gave me. |
Mapnik has the
stroke-linecap
option that handles how ends of lines are rendered. One of the consequences is that when you usestroke-dasharray
, the same cap is used for the dashes. I would like to define the dash caps independently.I also plan to try to implement this myself, so if you could just give me some pointer where to start, I would really appreciate it.
The text was updated successfully, but these errors were encountered: