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.items: Added item visible bounds feature to PlotWidget items #3223

Merged
merged 8 commits into from
Oct 16, 2020

Conversation

t20100
Copy link
Member

@t20100 t20100 commented Oct 14, 2020

This PR adds method Item.getVisibleBoundsExtent to PlotWidget items to retrieve the visible extent of the item bounding box in the plot area.
It also adds a private API to enable tracking changes of this visible extent through the Item._sigVisibleBoundsExtentChanged signal.
This signal is only triggered when enabling "visible extent tracking" through Item._setVisibleBoundsExtentTracking and which can be retrieved throughItem._isVisibleBoundsExtentTracking.

@vallsv
Copy link
Contributor

vallsv commented Oct 16, 2020

Be careful that Tuple concept is like C, fixed number of typed elements. Tuple[float] is a tuple of a single float. Here you want Tuple[float,float,float,float].

Maybe it would be better to rename getVisibleExtent with bound something?

@t20100 t20100 force-pushed the plot-visibleextent branch from c7f56b6 to 9331600 Compare October 16, 2020 13:32
@t20100
Copy link
Member Author

t20100 commented Oct 16, 2020

Renamed visibleExtent to visibleBounds and fixed getVisibleBounds typing.

@t20100 t20100 changed the title silx.gui.plot.items: Added item visible extent feature to PlotWidget items silx.gui.plot.items: Added item visible bounds feature to PlotWidget items Oct 16, 2020
@vallsv vallsv merged commit 47d1bf3 into silx-kit:master Oct 16, 2020
@t20100 t20100 deleted the plot-visibleextent branch December 7, 2020 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants