pub struct Image<'ui> { /* private fields */ }Expand description
Builder for an image widget
Implementations§
Source§impl<'ui> Image<'ui>
impl<'ui> Image<'ui>
Sourcepub fn new(ui: &'ui Ui, texture: impl Into<TextureRef>, size: [f32; 2]) -> Self
pub fn new(ui: &'ui Ui, texture: impl Into<TextureRef>, size: [f32; 2]) -> Self
Creates a new image builder
Sourcepub fn uv0(self, uv0: [f32; 2]) -> Self
pub fn uv0(self, uv0: [f32; 2]) -> Self
Sets the UV coordinates for the top-left corner (default: [0.0, 0.0])
Sourcepub fn uv1(self, uv1: [f32; 2]) -> Self
pub fn uv1(self, uv1: [f32; 2]) -> Self
Sets the UV coordinates for the bottom-right corner (default: [1.0, 1.0])
Sourcepub fn tint_color(self, tint_color: [f32; 4]) -> Self
pub fn tint_color(self, tint_color: [f32; 4]) -> Self
Sets the tint color (default: white, no tint)
Sourcepub fn border_color(self, border_color: [f32; 4]) -> Self
pub fn border_color(self, border_color: [f32; 4]) -> Self
Sets the border color (default: transparent, no border)
Trait Implementations§
Auto Trait Implementations§
impl<'ui> Freeze for Image<'ui>
impl<'ui> !RefUnwindSafe for Image<'ui>
impl<'ui> !Send for Image<'ui>
impl<'ui> !Sync for Image<'ui>
impl<'ui> Unpin for Image<'ui>
impl<'ui> !UnwindSafe for Image<'ui>
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