1#[macro_export]
10macro_rules! profile_scope {
11 ($name:expr) => {
12 #[cfg(feature = "profiling")]
13 profiling::scope!($name);
14 };
15 ($name:expr, $data:expr) => {
16 #[cfg(feature = "profiling")]
17 profiling::scope!($name, $data);
18 };
19}
20
21pub mod frame_history;
23
24#[cfg(feature = "serde")]
26pub mod styles;
27
28pub mod composite;
30
31pub mod about;
32pub mod progressbar;
34pub mod progresswindow;
36
37pub mod fonts;
38#[cfg(feature = "plots")]
39pub mod logplot;
40pub mod repainting;
41#[cfg(feature = "serde")]
42pub mod serde;
43pub mod toolframe;
44pub mod visuals;
45
46pub trait WithAlpha {
47 #[must_use]
48 fn with_alpha(self, alpha: u8) -> Self;
49}
50impl WithAlpha for egui::Color32 {
51 #[must_use]
52 fn with_alpha(self, alpha: u8) -> Self {
53 let [r, g, b, _] = self.to_srgba_unmultiplied();
54 egui::Color32::from_rgba_unmultiplied(r, g, b, alpha)
55 }
56}