Enum i_slint_core::ImageInner
source · pub enum ImageInner {
None,
EmbeddedImage {
cache_key: ImageCacheKey,
buffer: SharedImageBuffer,
},
Svg(VRc<OpaqueImageVTable, ParsedSVG>),
StaticTextures(&'static StaticTextures),
BackendStorage(VRc<OpaqueImageVTable>),
}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>)
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.