-
Notifications
You must be signed in to change notification settings - Fork 53
Tooltips, add overlay render pass #830
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
Conversation
@@ -7,7 +7,7 @@ | |||
from ._rect import RectManager | |||
|
|||
|
|||
class UnderlayCamera(pygfx.Camera): | |||
class ScreenSpaceCamera(pygfx.Camera): | |||
""" | |||
Same as pygfx.ScreenCoordsCamera but y-axis is inverted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@almarklein would be useful to have a pygfx Camera that is in screenspace with inverted y, pointer events use (0, 0) as the top left corner so it would be useful to have the option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this? pygfx/pygfx#1092
@clewis7 ready for review Custom tooltips by providing a function that takes the pointer event and outputs a |
📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/tooltips |
# overlay render pass | ||
self.renderer.render(self._overlay_scene, self._overlay_camera, flush=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@almarklein the overlay render pass without the depth buffer doesn't exist yet right? we'll just keep this here for now and update later I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice as always, just a few nitpicky things
Co-authored-by: Caitlin Lewis <69729525+clewis7@users.noreply.github.com>
closes #753
Tooltip
class that can manage displaying tooltips for registeredGraphics
Figure.tooltip_manager
is anTooltip
instanceFigure.show_tooltip
is a settable propertyFigure.tooltip_manager.register()
is a method than can be used for customizable registration of tooltips.Usage options:
Auto-register all
Graphics
that will be added to the figure. Tooltips display thedata
of the hovered vertex or image array element (either grayscale value or RGB(A) values).Manually register a tooltip for a
Graphic
.Manually register a tooltip to show custom info by register a function that takes the pointer event and returns a
str
:tt-2025-05-20_03.50.28.mp4