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

Add screenshot method considering overlay canvas #148

Merged
merged 2 commits into from
May 17, 2021

Conversation

eltos
Copy link
Contributor

@eltos eltos commented May 15, 2021

  • Adds method screenshot(include_overlay = true) to returns the screenshot as DataURL, considering not only the rendered 3D WebGL scene but also the overlay canvas (where labels are drawn).
  • Update method capture(filename, include_overlay = true) to also consider the overlay canvas.

For backwards compatibility, a screenshot without the overlay canvas can still be generated by setting the optional parameter include_overlay to false.

Fixes vpython/vpython-jupyter#152

@BruceSherwood BruceSherwood merged commit c39fb91 into vpython:master May 17, 2021
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.

scene.capture() does not include labels
2 participants