Skip to content

Conversation

@signedav
Copy link
Collaborator

Simple line with arrowheads and marker line with arrowheads in the category "Showcase".

Screencast.From.2026-01-15.16-33-49.mp4

This PR depends on #64548 because the use of the trim option on marker lines.

@signedav signedav marked this pull request as ready for review January 15, 2026 15:45
@github-actions github-actions bot added this to the 4.0.0 milestone Jan 15, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit b4fd048)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This installer is not signed, control+click > open the app to avoid the warning
(Built from commit b4fd048)

</data_defined_properties>
</layer>
</symbol>
<symbol alpha="1" clip_to_extent="1" force_rhr="0" frame_rate="10" is_animated="0" name="arrowheads markerline" tags="Showcase" type="line">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you set addedVersion here too? Otherwise the auto-upgrade logic won't kick in.

@nyalldawson
Copy link
Collaborator

Why's the start trim here different to the end trim? Can you explain why those values need to be different?

@signedav
Copy link
Collaborator Author

Thanks!

Why's the start trim here different to the end trim? Can you explain why those values need to be different?

It's a compromise. Because the marker starts at the start-trim position, but does not end exactly at the end-trim position.

First, when the last element before the gab is a gap, the end trim appears longer than it is (here with starttrim 3 and endtrim 3 - would be the same with endtrim 2.1):

image

On endtrim 2 it would still be another marker, so the end-gap is small, but looks better.

image

Still a problem, when the line is not a whole element in the end. Here again an endtrim of 2:

image

So one have to find the best value so there are not too large gaps and still not too close at the end marker. In the example of this PR we have an element of size 6 and an interval of size 6. We have a starttrim of 8 and an endtrim of 5 what appeared to me the best solution (starttrim minus half of the marker size). But honestly I'm not 100% convinced anymore. But I can do more evaluations on Monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants