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:graphics/qt5; Allow to draw transparent polygons #878

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

metalstrolch
Copy link
Contributor

There is a "misconception" in qt5 graphics about how to draw transparent stuff causing transparent items on the map to not correctly work. This PR changes qt5 graphics to force-clear overlays on starting to draw them instead of force clearing the shape of a transparent item. While this imposes the limitation that the content of an overlay cannot be drawn in multiple runs, it allows to draw transparent stuff on the map.
Luckily I don't know of any overlay item yet that is not drawn in one run. So this seems to work OK.

@metalstrolch
Copy link
Contributor Author

Immediately merging this as only relevant for qt5 graphics. Blame me on new bugs imposed by it.

Btw. I strongly need to find out how Navit initially intended to clear the overlays, or if and when it expects the overlay to be clear. No doc about it, so still guessing. Assume the background_gc callback of the graphics has something to do with that.

@metalstrolch metalstrolch merged commit deccb6c into trunk Sep 20, 2019
@metalstrolch metalstrolch deleted the qt5_transparency branch September 25, 2019 20:43
viktorgino pushed a commit that referenced this pull request Sep 22, 2020
There is a "misconception" in qt5 graphics about how to draw transparent stuff causing transparent items on the map to not correctly work. This PR changes qt5 graphics to force-clear overlays on starting to draw them instead of force clearing the shape of a transparent item. While this imposes the limitation that the content of an overlay cannot be drawn in multiple runs, it allows to draw transparent stuff on the map.
Luckily I don't know of any overlay item yet that is not drawn in one run. So this seems to work OK.
jkoan pushed a commit to jkoan/navit that referenced this pull request Jun 30, 2021
There is a "misconception" in qt5 graphics about how to draw transparent stuff causing transparent items on the map to not correctly work. This PR changes qt5 graphics to force-clear overlays on starting to draw them instead of force clearing the shape of a transparent item. While this imposes the limitation that the content of an overlay cannot be drawn in multiple runs, it allows to draw transparent stuff on the map.
Luckily I don't know of any overlay item yet that is not drawn in one run. So this seems to work OK.
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.

1 participant