Enum i_slint_core::graphics::ImageInner
source · #[repr(u8)]pub enum ImageInner {
None,
EmbeddedImage {
cache_key: ImageCacheKey,
buffer: SharedImageBuffer,
},
Svg(VRc<OpaqueImageVTable, ParsedSVG>),
StaticTextures(&'static StaticTextures),
BackendStorage(VRc<OpaqueImageVTable>),
BorrowedOpenGLTexture(BorrowedOpenGLTexture),
}Expand description
A resource is a reference to binary data, for example images. They can be accessible on the file system or embedded in the resulting binary. Or they might be URLs to a web server and a downloaded is necessary before they can be used. cbindgen:prefix-with-name
Variants§
None
A resource that does not represent any data.
EmbeddedImage
Svg(VRc<OpaqueImageVTable, ParsedSVG>)
StaticTextures(&'static StaticTextures)
BackendStorage(VRc<OpaqueImageVTable>)
BorrowedOpenGLTexture(BorrowedOpenGLTexture)
Implementations§
source§impl ImageInner
impl ImageInner
sourcepub fn render_to_buffer(
&self,
_target_size_for_scalable_source: Option<Size2D<u32, PhysicalPx>>
) -> Option<SharedImageBuffer>
pub fn render_to_buffer( &self, _target_size_for_scalable_source: Option<Size2D<u32, PhysicalPx>> ) -> Option<SharedImageBuffer>
Return or render the image into a buffer
target_size_for_scalable_source is the size to use if the image is scalable.
Returns None if the image can’t be rendered in a buffer
Trait Implementations§
source§impl Clone for ImageInner
impl Clone for ImageInner
source§fn clone(&self) -> ImageInner
fn clone(&self) -> ImageInner
Returns a copy 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 moresource§impl Debug for ImageInner
impl Debug for ImageInner
source§impl Default for ImageInner
impl Default for ImageInner
source§fn default() -> ImageInner
fn default() -> ImageInner
Returns the “default value” for a type. Read more
source§impl<'a> From<&'a Image> for &'a ImageInner
impl<'a> From<&'a Image> for &'a ImageInner
source§impl From<ImageInner> for Image
impl From<ImageInner> for Image
source§fn from(original: ImageInner) -> Image
fn from(original: ImageInner) -> Image
Converts to this type from the input type.
source§impl PartialEq<ImageInner> for ImageInner
impl PartialEq<ImageInner> for ImageInner
Auto Trait Implementations§
impl !RefUnwindSafe for ImageInner
impl !Send for ImageInner
impl !Sync for ImageInner
impl Unpin for ImageInner
impl !UnwindSafe for ImageInner
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