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 clipboard image data get/set methods #76603

Closed
wants to merge 249 commits into from
Closed

Conversation

radzo73
Copy link
Contributor

@radzo73 radzo73 commented Apr 30, 2023

Closes godotengine/godot-proposals#2949.
TODO:

  • Image clipboard_get_image
  • void clipboard_set_image (Image img)

MewPurPur and others added 25 commits January 30, 2023 14:04
This solves the problem, that mouse events get sent to SubViewports
even if they are outside of the visible area of the SubViewport.

This changes makes SubViewportContainer::unhandled_input redundand.
Shortcut Events now need to be distributed via push_input, in order for
them to be able to reach SubViewports.
Also update the documentation to reflect this in both 2D and 3D.
Previous estimate of upper limit on size was incorrect
Also optimize some of the Noise methods
Previously, an EditorInspector's property name can only be set from
outside. Inspectors used for settings needs to respond to changes in
editor settings. So a few boilerplate code is almost always needed,
including watching for a certain editor setting in `_notification()`.

This commit adds a `set_use_settings_style()` function to tell the
inspector to watch for editor settings changes on its own.
Lower threshold for dot was (1.0 - threshold) which is incorrect.
Patch changes it to correct version sqrt(1.0 - threshold * threshold)

Co-authored-by: Ricardo Buring <[email protected]>
Use a temporary framebuffer for screen copy from rendertarget to screen.

This solves GLES3 rendering in android studio emulator (before this change there is just a black screen)

Based on discussion in:
godotengine#74828
- Mention that GPUParticlesAttractorVectorField3D can be used as an
  alternative to turbulence in 3D.
boy am I glad I test things
@radzo73 radzo73 requested review from a team as code owners April 30, 2023 01:55
@radzo73 radzo73 requested review from a team as code owners May 11, 2023 19:31
@radzo73 radzo73 changed the title Added clipboard has/image get methods Add raw clipboard data get/set methods May 11, 2023
@radzo73 radzo73 changed the title Add raw clipboard data get/set methods Add clipboard image data get/set methods May 11, 2023
@radzo73
Copy link
Contributor Author

radzo73 commented May 11, 2023

System-exclusive problems that I have to deal with when encoding/decoding to Godot's Image:

  • Windows requires a clipboard format when getting/setting data. Most likely format for image purposes is CF_DIB.
  • MacOS' clipboard primarily uses two image formats, PNG and TIFF
  • iOS can easily get all images on the clipboard, but main image formats will be kUTTypePNG and kUTTypeJPEG.
  • X11, Android, Web...I have no idea. (there's also the Wayland port to worry about)

@radzo73
Copy link
Contributor Author

radzo73 commented May 11, 2023

Closing in favor of a fresh fork
(because I didn't change those 490 files, Git)

@radzo73 radzo73 closed this May 11, 2023
@aaronfranke
Copy link
Member

@radzo73 In the future, you should open a pull request from a separate branch (radzo73:something), not from master (radzo73:master). This would prevent the issues you had.

@YuriSizov YuriSizov removed this from the 4.x milestone Dec 2, 2023
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.

Allow getting image data from the system clipboard