pub enum ImageSource {
Pixmap(Arc<Pixmap>),
OpaqueId(ImageId),
}Expand description
Bitmap source used by Image.
Variants§
Pixmap(Arc<Pixmap>)
Pixmap pixels travel with the scene packet.
OpaqueId(ImageId)
Pixmap pixels were registered earlier; this is just a handle.
Implementations§
Source§impl ImageSource
impl ImageSource
Sourcepub fn from_peniko_image_data(image: &ImageData) -> Self
pub fn from_peniko_image_data(image: &ImageData) -> Self
Convert a peniko::ImageData to an ImageSource.
This is a somewhat lossy conversion, as the image data data is transformed to premultiplied RGBA8.
§Panics
This panics if image has a width or height greater than u16::MAX.
Trait Implementations§
Source§impl Clone for ImageSource
impl Clone for ImageSource
Source§fn clone(&self) -> ImageSource
fn clone(&self) -> ImageSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ImageSource
impl RefUnwindSafe for ImageSource
impl Send for ImageSource
impl Sync for ImageSource
impl Unpin for ImageSource
impl UnwindSafe for ImageSource
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