Skip to content
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

Fix artifacts when rendering filled line symbol #60554

Merged
merged 4 commits into from
Feb 13, 2025

Conversation

nyalldawson
Copy link
Collaborator

Use geos to calculate the buffered line instead of Qt's path stroker,
as the later results in artifacts when line segments pass close
to other segments

Fixes #59689

This overload avoids creating a QgsGeometry if we only have a
QgsAbstractGeometry pointer object to convert
These methods directly work with GEOS geometries and avoid the
forced conversions to/from QgsAbstractGeometry objects, and are
intended for use in chained operations where the intermediate conversions
are not required.
Use geos to calculate the buffered line instead of Qt's path stroker,
as the later results in artifacts when line segments pass close
to other segments

Fixes qgis#59689
@github-actions github-actions bot added this to the 3.42.0 milestone Feb 12, 2025
Copy link

github-actions bot commented Feb 12, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit f0110d6)

🪟 Windows Qt6 builds

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

Copy link
Contributor

@nirvn nirvn left a comment

Choose a reason for hiding this comment

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

Thanks I've been hit with this one before.

@nyalldawson nyalldawson merged commit 22d828f into qgis:master Feb 13, 2025
39 checks passed
@nyalldawson nyalldawson deleted the fix_59689 branch February 13, 2025 04:54
@qgis-bot
Copy link
Collaborator

The backport to release-3_40 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply ecf57ef9846... Add methods to directly buffer/offset GEOS geometry in QgsGeos
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"

stdout
Auto-merging src/core/symbology/qgssymbollayerutils.cpp
[backport-60554-to-release-3_40 609c68b4a45] Add method to directly convert QgsAbstractGeometry to QPolygonF lists
 Author: Nyall Dawson <[email protected]>
 Date: Wed Feb 12 13:14:14 2025 +1000
 4 files changed, 40 insertions(+), 5 deletions(-)
Auto-merging src/core/painting/qgsgeometrypaintdevice.cpp
Auto-merging src/core/symbology/qgssymbollayerutils.cpp
[backport-60554-to-release-3_40 ca06d8e8a6a] Move some useful utility methods to QgsSymbolLayerUtils
 Author: Nyall Dawson <[email protected]>
 Date: Wed Feb 12 13:22:47 2025 +1000
 8 files changed, 85 insertions(+), 40 deletions(-)
CONFLICT (modify/delete): python/PyQt6/core/auto_generated/geometry/qgsgeos.sip.in deleted in HEAD and modified in ecf57ef9846 (Add methods to directly buffer/offset GEOS geometry in QgsGeos).  Version ecf57ef9846 (Add methods to directly buffer/offset GEOS geometry in QgsGeos) of python/PyQt6/core/auto_generated/geometry/qgsgeos.sip.in left in tree.
CONFLICT (modify/delete): python/core/auto_generated/geometry/qgsgeos.sip.in deleted in HEAD and modified in ecf57ef9846 (Add methods to directly buffer/offset GEOS geometry in QgsGeos).  Version ecf57ef9846 (Add methods to directly buffer/offset GEOS geometry in QgsGeos) of python/core/auto_generated/geometry/qgsgeos.sip.in left in tree.
Auto-merging src/core/geometry/qgsgeos.cpp
Auto-merging src/core/geometry/qgsgeos.h

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_40 release-3_40
# Navigate to the new working tree
cd .worktrees/backport-release-3_40
# Create a new branch
git switch --create backport-60554-to-release-3_40
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 97f6dc5bbe9ab74120c33f3ab4b67958604d7408,649dc29c3213a10a2e402e83386ce8fa2dc1cf76,ecf57ef9846d45278d4c4c24fbd4e0dd93ed9b6a,f0110d6d0f1ef77f450ddc5210f6f8e71ac808f5
# Push it to GitHub
git push --set-upstream origin backport-60554-to-release-3_40
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_40

Then, create a pull request where the base branch is release-3_40 and the compare/head branch is backport-60554-to-release-3_40.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3_40 failed backport The automated backport attempt failed, needs a manual backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filled Line Print to PDF Creates Artefects
3 participants