mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Automatically generate screenshots for all examples (#2379)
This commit is contained in:
@@ -9,6 +9,8 @@ publish = false
|
||||
|
||||
|
||||
[dependencies]
|
||||
eframe = { path = "../../crates/eframe" }
|
||||
eframe = { path = "../../crates/eframe", features = [
|
||||
"__screenshot", # __screenshot is so we can dump a ascreenshot using EFRAME_SCREENSHOT_TO
|
||||
] }
|
||||
egui_extras = { path = "../../crates/egui_extras", features = ["image"] }
|
||||
image = { version = "0.24", default-features = false, features = ["png"] }
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Example how to show an image with eframe/egui.
|
||||
|
||||
```sh
|
||||
cargo run -p retained_image
|
||||
```
|
||||
|
||||

|
||||
|
||||
BIN
examples/retained_image/screenshot.png
Normal file
BIN
examples/retained_image/screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
@@ -5,7 +5,7 @@ use egui_extras::RetainedImage;
|
||||
|
||||
fn main() {
|
||||
let options = eframe::NativeOptions {
|
||||
initial_window_size: Some(egui::vec2(500.0, 900.0)),
|
||||
initial_window_size: Some(egui::vec2(300.0, 900.0)),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user