Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Average line angles for marker and hashed line symbology
Previously, when marker or hash lines were rendered using interval or center point place placement, the symbol angles were determined by taking the exact line orientation at the position of the symbol. This often leads to undesirable rendering effects, where little jaggies or corners in lines which occur at the position of the symbol cause the marker or hash line to be oriented at a very different angle to what the eye expects to see. With this new option, the angle is instead calculated by averaging the line over a specified distance either side of the symbol. E.g. averaging the line angle over 4mm means we take the points along the line 2mm from either side of the symbol placement, and use these instead to calculate the line angle for that symbol. This has the effect of smoothing (or removing) any tiny local deviations from the overall line direction, resulting in much nicer visual orientation of marker or hash lines. Like all symbol settings, the average angle smoothing distance can be set using mm/pixels/map units/etc, and supports data-defined values. Closed rings also correctly consider wrapping around these average angles from the start/end vertex. (Sponsored by an anonymous corporate backer)
- Loading branch information
Showing with 1,169 additions and 164 deletions.
- +76 −0 python/core/auto_generated/symbology/qgslinesymbollayer.sip.in
- +1 −0 python/core/auto_generated/symbology/qgssymbollayer.sip.in
- +273 −53 src/core/symbology/qgslinesymbollayer.cpp
- +77 −2 src/core/symbology/qgslinesymbollayer.h
- +1 −0 src/core/symbology/qgssymbollayer.cpp
- +1 −0 src/core/symbology/qgssymbollayer.h
- +70 −2 src/gui/symbology/qgssymbollayerwidget.cpp
- +4 −0 src/gui/symbology/qgssymbollayerwidget.h
- +154 −73 src/ui/symbollayer/widget_hashline.ui
- +107 −31 src/ui/symbollayer/widget_markerline.ui
- +238 −3 tests/src/core/testqgsmarkerlinesymbol.cpp
- +73 −0 tests/src/python/test_qgshashlinesymbollayer.py
- +94 −0 tests/src/python/test_qgsmarkerlinesymbollayer.py
- BIN ...ser_paper/expected_composerpaper_markerborder/layout/expected_composerpaper_markerborder_mask.png
- BIN ...rter/expected_importComposerTemplatePolyline_0/expected_importComposerTemplatePolyline_0_mask.png
- BIN ...compositionconverter/expected_importComposerTemplate_1/expected_importComposerTemplate_1_mask.png
- BIN tests/testdata/control_images/expected_style_linecanvasclip/expected_style_linecanvasclip_mask.png
- BIN ...tdata/control_images/expected_style_linecanvasclip_off/expected_style_linecanvasclip_off_mask.png
- BIN ...trol_images/symbol_hashline/expected_line_hash_average_angle/expected_line_hash_average_angle.png
- BIN ...mbol_hashline/expected_line_hash_center_average_angle/expected_line_hash_center_average_angle.png
- BIN ...s/symbol_hashline/expected_line_hash_ring_average_angle/expected_line_hash_ring_average_angle.png
- BIN ..._images/symbol_markerline/expected_markerline_average_angle/expected_markerline_average_angle.png
- BIN ..._markerline/expected_markerline_center_average_angle/expected_markerline_center_average_angle.png
- BIN ...mbol_markerline/expected_markerline_ring_average_angle/expected_markerline_ring_average_angle.png
- BIN ..._images/symbol_markerline/expected_markerline_ring_no_dupes/expected_markerline_ring_no_dupes.png
There are no files selected for viewing
Oops, something went wrong.