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

silx.gui.plot.PlotWidget: Fixed display of Shape with dashes and a background color #3906

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

t20100
Copy link
Member

@t20100 t20100 commented Jul 12, 2023

This PR fixes the display of Shape items with the matplotlib backend when they are display with dash and a background color.
It does so by changing the implementation of the feature to avoid using a proxy item in the backend

closes #3879

@t20100 t20100 added this to the 2.0.0 milestone Jul 12, 2023
@t20100 t20100 requested a review from vallsv July 12, 2023 08:23
Comment on lines +417 to +428
edgecolor = self.get_edgecolor()
hatch = self.get_hatch()

self.set_linestyle("solid")
self.set_edgecolor(self.get_second_edgecolor())
self.set_hatch(None)
super().draw(renderer)

def set_transform(self, transform):
self.__patch.set_transform(transform)
self.set_linestyle(linestyle)
self.set_edgecolor(edgecolor)
self.set_hatch(hatch)
super().draw(renderer)
Copy link
Member Author

Choose a reason for hiding this comment

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

I kept the same rendering as before, there's probably a better way, but this has been working fine so far.

@vallsv vallsv merged commit 198eaa6 into silx-kit:main Jul 12, 2023
7 checks passed
@t20100 t20100 deleted the fix-patch-outside-plot branch July 13, 2023 12:28
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.

plot: Shape can be drawn outside of the plot
2 participants