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

Make rounded corners clip the image in ImageButton #721

Closed
Kesanov opened this issue Sep 14, 2021 · 2 comments · Fixed by #3257
Closed

Make rounded corners clip the image in ImageButton #721

Kesanov opened this issue Sep 14, 2021 · 2 comments · Fixed by #3257
Labels
feature New feature or request visuals Renderings / graphics releated
Milestone

Comments

@Kesanov
Copy link

Kesanov commented Sep 14, 2021

Currently, the image remains in its original shape - usually rectangular.

Furthermore, the border is painted under the image.
If it had been painted on top, it would appear to clip the image beneath.

@Kesanov
Copy link
Author

Kesanov commented Sep 14, 2021

Additionally, the border seems to be few pixels wider than it should:
image

emilk added a commit that referenced this issue Sep 20, 2021
@emilk
Copy link
Owner

emilk commented Sep 20, 2021

Making a frame that looks good for any image is difficult, but I at least made some improvements.

Rounded corners on an egui::Image and egui::ImageButton would be super nice, and not that difficult to implement if someone wants to take a stab at it.

@emilk emilk added the feature New feature or request label Sep 28, 2021
mankinskin pushed a commit to mankinskin/egui that referenced this issue Sep 29, 2021
@emilk emilk added the visuals Renderings / graphics releated label Apr 16, 2022
@emilk emilk added this to the 0.23.0 milestone Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request visuals Renderings / graphics releated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants