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
Available on crate features bmp or dds or dxt or farbfeld or gif or hdr or ico or jpeg_rayon or jpeg or png or pnm or tga or webp only.
impl Clone for ImageWidget
Available on crate features
bmp or dds or dxt or farbfeld or gif or hdr or ico or jpeg_rayon or jpeg or png or pnm or tga or webp only.Source§impl Drop for ImageWidget
Available on crate features bmp or dds or dxt or farbfeld or gif or hdr or ico or jpeg_rayon or jpeg or png or pnm or tga or webp only.
impl Drop for ImageWidget
Available on crate features
bmp or dds or dxt or farbfeld or gif or hdr or ico or jpeg_rayon or jpeg or png or pnm or tga or webp only.Source§impl From<SVGWidget> for ImageWidget
Available on crate features bmp or dds or dxt or farbfeld or gif or hdr or ico or jpeg_rayon or jpeg or png or pnm or tga or webp only.
impl From<SVGWidget> for ImageWidget
Available on crate features
bmp or dds or dxt or farbfeld or gif or hdr or ico or jpeg_rayon or jpeg or png or pnm or tga or webp only.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 UnsafeUnpin for ImageWidget
impl UnwindSafe for ImageWidget
Blanket Implementations§
impl<T> AnyMapTrait for T
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