pub enum ImageSource {
Raster(Rc<RasterImage>),
Vector(Rc<VectorImage>),
}Expand description
Decoded image data for an Img node.
Variants§
Raster(Rc<RasterImage>)
PNG or JPEG pixels.
Vector(Rc<VectorImage>)
SVG paths, drawn as vectors at any scale.
Implementations§
Source§impl ImageSource
impl ImageSource
Sourcepub fn natural_size(&self) -> (f64, f64)
pub fn natural_size(&self) -> (f64, f64)
Size in pixels (raster) or view-box units (SVG).
Trait Implementations§
Source§impl Clone for ImageSource
impl Clone for ImageSource
Auto Trait Implementations§
impl !Send for ImageSource
impl !Sync for ImageSource
impl Freeze for ImageSource
impl RefUnwindSafe for ImageSource
impl Unpin for ImageSource
impl UnsafeUnpin 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