#[macro_export]
macro_rules! profile_scope {
($name:expr) => {
#[cfg(feature = "profiling")]
profiling::scope!($name);
};
($name:expr, $data:expr) => {
#[cfg(feature = "profiling")]
profiling::scope!($name, $data);
};
}
pub mod frame_history;
#[cfg(feature = "serde")]
pub mod styles;
pub mod composite;
pub mod about;
pub mod progressbar;
pub mod fonts;
#[cfg(feature = "plots")]
pub mod logplot;
pub mod repainting;
#[cfg(feature = "serde")]
pub mod serde;
pub mod toolframe;
pub mod visuals;
pub mod build {
include!(concat!(env!("OUT_DIR"), "/builders.rs"));
}
pub trait WithAlpha {
#[must_use]
fn with_alpha(self, alpha: u8) -> Self;
}
impl WithAlpha for egui::Color32 {
#[must_use]
fn with_alpha(self, alpha: u8) -> Self {
let [r, g, b, _] = self.to_srgba_unmultiplied();
egui::Color32::from_rgba_unmultiplied(r, g, b, alpha)
}
}