pub struct RasterizedGradient {
pub pixels: [u8; 1024],
pub stop_count: usize,
}Expand description
Rasterized gradient data ready for GPU upload
Fields§
§pixels: [u8; 1024]RGBA pixel data (256 * 4 bytes)
stop_count: usizeNumber of color stops in the original gradient
Implementations§
Source§impl RasterizedGradient
impl RasterizedGradient
Sourcepub fn from_stops(stops: &[GradientStop], spread: SpreadMode) -> Self
pub fn from_stops(stops: &[GradientStop], spread: SpreadMode) -> Self
Rasterize a gradient with multiple stops into a 256-wide texture
Auto Trait Implementations§
impl Freeze for RasterizedGradient
impl RefUnwindSafe for RasterizedGradient
impl Send for RasterizedGradient
impl Sync for RasterizedGradient
impl Unpin for RasterizedGradient
impl UnsafeUnpin for RasterizedGradient
impl UnwindSafe for RasterizedGradient
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