pub struct ImageWidget { /* private fields */ }
Implementations§
Source§impl ImageWidget
impl ImageWidget
pub fn texture_id(&self) -> TextureId
pub fn size(&self) -> Vec2
pub fn widget(&self) -> Image
pub fn resize(&mut self, x: f32, y: f32)
pub fn set_size_x(&mut self, x: f32)
pub fn set_size_y(&mut self, y: f32)
Sourcepub fn new(painter: &mut Painter, bytes: &[u8]) -> Result<Self, ImageError>
pub fn new(painter: &mut Painter, bytes: &[u8]) -> Result<Self, ImageError>
Create new image from bytes (image-format support will adapt according to the enabled features).
Sourcepub fn update_image(
&mut self,
painter: &mut Painter,
bytes: &[u8],
) -> Result<(), ImageError>
pub fn update_image( &mut self, painter: &mut Painter, bytes: &[u8], ) -> Result<(), ImageError>
Update with new image from bytes.
Trait Implementations§
Source§impl Clone for ImageWidget
impl Clone for ImageWidget
Source§impl Drop for ImageWidget
impl Drop for ImageWidget
Source§impl From<SVGWidget> for ImageWidget
impl From<SVGWidget> for ImageWidget
Source§fn from(t: SVGWidget) -> ImageWidget
fn from(t: SVGWidget) -> ImageWidget
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ImageWidget
impl RefUnwindSafe for ImageWidget
impl Send for ImageWidget
impl Sync for ImageWidget
impl Unpin for ImageWidget
impl UnwindSafe for ImageWidget
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