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

Allow attaching custom user data to a screenshot command #5416

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

emilk
Copy link
Owner

@emilk emilk commented Nov 29, 2024

This lets users trigger a screenshot from anywhere, and then when they get back the results they have some context about what part of their code triggered the screenshot.

@emilk emilk added the egui label Nov 29, 2024
Copy link

Preview available at https://egui-pr-preview.github.io/pr/5416-emilk/screenshot-context
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@emilk emilk added the feature New feature or request label Dec 1, 2024
@emilk emilk force-pushed the emilk/screenshot-context branch from 1c0b022 to beb9ad5 Compare December 1, 2024 19:13
@emilk emilk merged commit a9c76ba into master Dec 3, 2024
46 checks passed
@emilk emilk deleted the emilk/screenshot-context branch December 3, 2024 09:08
emilk added a commit to rerun-io/rerun that referenced this pull request Dec 3, 2024
### Related
* Closes #3941
* Uses emilk/egui#5416
* Uses emilk/egui#5426
* Follow-up: #8264

### What
Right-click the name of any space view to get the option to copy its
contents as a screenshot, or save it to disk:


![image](https://github.com/user-attachments/assets/0a0c5215-9042-4989-9e4a-62f76823588a)

-> 


![image](https://github.com/user-attachments/assets/ec222323-4692-4fd2-ae7b-2342996829a3)


#### Details
The implementation simply takes a full-screen screenshot and crops the
result.

The previous attempt (behind a feature-flag) only captured things that
were rendered with `re_renderer`, i.e. did not include any egui
elements, like labels. So it also only worked on spatial views. This PR
work on _all_ space views, and could also be extended to work on
containers etc.

### Limitations
Not yet implemented on web. See
#8264

### TODO
* [x] Point commit hash to egui `master`

---------

Co-authored-by: Andreas Reich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant