GenericMappingTools / GenericMappingTools/gmt
Ability to change line cap and join on a per-pen basis
- Dominant language
- C
- Stars
- 979
- Forks
- 414
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 54
Description
**Description of the desired feature**
See this forum [example](https://forum.generic-mapping-tools.org/t/legend-questions/1793/2) to illustrate a current weakness: Inability to switch PostScript line cap and join settings for given pens within a module, since these are under the control of GMT settings **PS_LINE_CAP** and **PS_LINE_JOIN**. The only real solution for getting this to work well is for the pen specification _width_[,_color_][,_style_] to acquire a way to indicate a change in cap or join.
To recap (no pun intended), we have
**PS_LINE_CAP**: **b**utt, **r**ound, **s**quare [**b**]
**PS_LINE_JOIN**: **m**iter, **r**ound, **b**evel [**m**]
Perhaps one way would be to extend the style argument to take optional modifiers **+ab**|**r**|**s** and **+jm**|**r**|**b**?
An example would be `-W4p,orange,0_8+ar`, yielding

This means the internal GMT pen structure will need to carry these flags and call the required PostScript operators when we set a pen. Comments, @GenericMappingTools/core ?
Contributor guide
Assessment
This issue has not been assessed yet.