pub type ImageBrushRef<'a> = ImageBrush<&'a ImageData>;Expand description
Borrowed version of ImageBrush for avoiding reference counting overhead.
This is useful for methods that would like to accept image brushes by reference.
Defining the type as impl Into<ImageBrushRef> is the most general useful argument
type, as it also allows &ImageBrush.
Aliased Type§
pub struct ImageBrushRef<'a> {
pub image: &'a ImageData,
pub sampler: ImageSampler,
}Fields§
§image: &'a ImageDataThe image to render.
sampler: ImageSamplerParameters which specify how to sample from the image during rendering.
Implementations§
Source§impl ImageBrushRef<'_>
impl ImageBrushRef<'_>
Sourcepub fn to_owned(&self) -> ImageBrush
pub fn to_owned(&self) -> ImageBrush
Converts the ImageBrushRef to an owned ImageBrush.
Trait Implementations§
Source§impl<'a> From<&'a ImageBrush> for ImageBrushRef<'a>
impl<'a> From<&'a ImageBrush> for ImageBrushRef<'a>
Source§fn from(value: &'a ImageBrush) -> Self
fn from(value: &'a ImageBrush) -> Self
Converts to this type from the input type.