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

Set exact window size #482

Closed
nikolausWest opened this issue Dec 7, 2022 · 1 comment · Fixed by #2293
Closed

Set exact window size #482

nikolausWest opened this issue Dec 7, 2022 · 1 comment · Fixed by #2293
Labels
enhancement New feature or request help wanted Extra attention is needed ui concerns graphical user interface

Comments

@nikolausWest
Copy link
Member

Is your feature request related to a problem? Please describe.
When creating demo videos of Rerun I want the screen to have a specific aspect ration (different depending on where the video will be shared). Right now I have to fiddle a lot by hand to get it to the right size.

Describe the solution you'd like
I want to be able to explicitly configure the screen resolution of Rerun. One option would be as a command line argument like:

python -m rerun --window-size 1500x900 

Describe alternatives you've considered
Another alternative could be to somehow expose the window size as a blueprint option. This would be more consistent of how we want to use it in the future.

@nikolausWest nikolausWest added enhancement New feature or request ui concerns graphical user interface labels Dec 7, 2022
@emilk emilk added the good first issue Good for newcomers label Jan 16, 2023
@emilk emilk assigned emilk and unassigned emilk Jan 20, 2023
@emilk
Copy link
Member

emilk commented Jan 20, 2023

I think this may require some eframe changes. eframe::NativeOptions::initial_window_size will be overwritten by whatever size was used on the previous run, restored from disk state.

@Wumpf Wumpf added the help wanted Extra attention is needed label Feb 16, 2023
@emilk emilk removed the good first issue Good for newcomers label Apr 17, 2023
emilk added a commit that referenced this issue Jun 1, 2023
Closes #2117
Closes #482

### What
Cmd-P for command palette, then select "Screenshot" command. Rerun will
re-style itself for Web for a frame, screenshot that, and then copy it
to the clipboard. I only implemented this for the native viewer.

You can set the resolution at startup with `--window-size`. All
screenshots are captured at 2x pixels-per-point, i.e. pretending that
you are on a high-dpi screen, wether you are or not.

You can also trigger this from the command line:

```
❯ cargo rerun ../fiat.rrd --screenshot-to fiat.png
    Finished dev [optimized + debuginfo] target(s) in 0.46s
     Running `target/debug/rerun ../fiat.rrd --screenshot-to fiat.png --window-size 1024x768`
[2023-05-31T16:11:21Z INFO  rerun::run] Loading "../fiat.rrd"…
[2023-05-31T16:11:22Z INFO  re_viewer::screenshotter] Screenshot saved to "fiat.png"
```

We can use this to generate screenshots for our examples.

### Result:


![fiat](https://github.com/rerun-io/rerun/assets/1148717/98cc125e-6cb5-4d84-81ff-062f54c7fb97)



### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2293

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/11b16c5/docs
<!-- pr-link-docs:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed ui concerns graphical user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants