egui/examples
hacknus 871041c4e7
Added an example to save plot to image (#2769)
* implement save_plot

* fix for check.sh

* clippy

* add save_plot to Cargo.lock

* adapted for PR #2676 (removes unsafe code)

* add some comments

* implemented the comments from emilk

* update comments in code

* rustfmt

* remove picked_path

* add more comments

* removed unused import

* use `inner.response.rect` as the plot position

* remove plot_location from MyApp members

* sort entries

* Update examples/save_plot/src/main.rs

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* use env_logger instead of tracing subscriber

* use env_logger instead of tracing subscriber and combine if let

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-08-10 12:35:11 +02:00
..
confirm_exit Update example screenshots 2023-05-23 13:38:02 +02:00
custom_3d_glow Update example screenshots 2023-05-23 13:38:02 +02:00
custom_font Update example screenshots 2023-05-23 13:38:02 +02:00
custom_font_style Update example screenshots 2023-05-23 13:38:02 +02:00
custom_window_frame Update example screenshots 2023-05-23 13:38:02 +02:00
download_image clippy fixes from 1.69.0 2023-04-21 11:33:18 +02:00
file_dialog Update example screenshots 2023-05-23 13:38:02 +02:00
hello_world Update example screenshots 2023-05-23 13:38:02 +02:00
hello_world_par use env_logger in all examples (#2934) 2023-04-19 16:35:38 +02:00
hello_world_simple Cleanup ahead of release 2023-05-23 19:53:32 +02:00
keyboard_events Update example screenshots 2023-05-23 13:38:02 +02:00
puffin_profiler Update to puffin 0.16 (#3144) 2023-07-10 12:29:01 +02:00
retained_image Update example screenshots 2023-05-23 13:38:02 +02:00
save_plot Added an example to save plot to image (#2769) 2023-08-10 12:35:11 +02:00
screenshot clippy fixes from 1.69.0 2023-04-21 11:33:18 +02:00
serial_windows Update example screenshots 2023-05-23 13:38:02 +02:00
svg Update example screenshots 2023-05-23 13:38:02 +02:00
user_attention Update example screenshots 2023-05-23 13:38:02 +02:00
README.md examples/README.md: explain that the examples are for master 2023-02-08 20:34:43 +01:00

README.md

egui and eframe examples

All the examples in this folder uses eframe to set up a window for egui. Some examples are specific to eframe, but many are applicable to any egui integration.

There are a lot more examples at https://www.egui.rs, and it has links to the source code of each example.

Also check out the official docs at https://docs.rs/egui and https://docs.rs/eframe.

Note that all the examples on master are for the latest master version of egui.

If you want to look for examples for a specific version of egui, go to that tag, e.g. https://github.com/emilk/egui/tree/latest/examples.