ImageBrushRef

Type Alias ImageBrushRef 

Source
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 ImageData

The image to render.

§sampler: ImageSampler

Parameters which specify how to sample from the image during rendering.

Implementations§

Source§

impl ImageBrushRef<'_>

Source

pub fn to_owned(&self) -> ImageBrush

Converts the ImageBrushRef to an owned ImageBrush.

Trait Implementations§

Source§

impl<'a> From<&'a ImageBrush> for ImageBrushRef<'a>

Source§

fn from(value: &'a ImageBrush) -> Self

Converts to this type from the input type.