pub struct Gradient { /* private fields */ }Expand description
Gradient builder for creating various gradient types
§Example
use egui::Color32;
use armas_basic::color::{Gradient, ColorStop};
let gradient = Gradient::linear(Color32::RED, Color32::BLUE);
let mid_color = gradient.sample(0.5);Implementations§
Source§impl Gradient
impl Gradient
Sourcepub fn radial_mesh(&self, center: Pos2, radius: f32, segments: usize) -> Mesh
pub fn radial_mesh(&self, center: Pos2, radius: f32, segments: usize) -> Mesh
Generate a radial gradient mesh
Creates a circular gradient emanating from a center point
Auto Trait Implementations§
impl Freeze for Gradient
impl RefUnwindSafe for Gradient
impl Send for Gradient
impl Sync for Gradient
impl Unpin for Gradient
impl UnsafeUnpin for Gradient
impl UnwindSafe for Gradient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more