pub struct Image { /* private fields */ }
Expand description
Builder for an image widget
Implementations§
Source§impl Image
impl Image
Sourcepub fn new(texture_id: TextureId, size: impl Into<Vector2<f32>>) -> Image
pub fn new(texture_id: TextureId, size: impl Into<Vector2<f32>>) -> Image
Creates a new image builder with the given texture and size
Sourcepub fn size(self, size: impl Into<Vector2<f32>>) -> Self
👎Deprecated: just set the size in the new
constructor.
pub fn size(self, size: impl Into<Vector2<f32>>) -> Self
new
constructor.Sets the image size
Sourcepub fn tint_col(self, tint_col: impl Into<Vector4<f32>>) -> Self
pub fn tint_col(self, tint_col: impl Into<Vector4<f32>>) -> Self
Sets the tint color (default: no tint color)
Sourcepub fn border_col(self, border_col: impl Into<Vector4<f32>>) -> Self
pub fn border_col(self, border_col: impl Into<Vector4<f32>>) -> Self
Sets the border color (default: no border)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
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