pub fn add_window_overlay(
		&mut self,
		window_id: WindowId,
		name: impl Into<String>,
		image: &impl AsImageView,
	) -> Result<(), SetImageError> {
		let window = self
			.context
			.windows
			.iter_mut()
			.find(|w| w.id() == window_id)
			.ok_or(InvalidWindowId { window_id })?;
		let image = GpuImage::from_data(
			name.into(),
			&self.context.device,
			&self.context.image_bind_group_layout,
			image.as_image_view()?,
		);
		window.overlays.push(image);
		window.window.request_redraw();
		Ok(())
	}
/// Add an overlay to a window.
///
/// Overlays are drawn on top of the image.
/// Overlays remain active until you call they are cleared.
Add an overlay to a window.
Overlays are drawn on top of the image.
Overlays remain active until you call they are cleared.
Add an overlay to a window . Overlays are drawn on top of the image . Overlays remain active until you call they are cleared .
pub fn add_window_overlay(
		&mut self,
		window_id: WindowId,
		name: impl Into<String>,
		image: &impl AsImageView,
	) -> Result<(), SetImageError> {
		let window = self
			.context
			.windows
			.iter_mut()
			.find(|w| w.id() == window_id)
			.ok_or(InvalidWindowId { window_id })?;
		let image = GpuImage::from_data(
			name.into(),
			&self.context.device,
			&self.context.image_bind_group_layout,
			image.as_image_view()?,
		);
		window.overlays.push(image);
		window.window.request_redraw();
		Ok(())
	}
pub fn add_window_overlay ( & mut self , window_id : WindowId , name : impl Into < String > , image : & impl AsImageView , ) -> Result < ( ) , SetImageError > { let window = self . context . windows . iter_mut ( ) . find ( | w | w . id ( ) == window_id ) . ok_or ( InvalidWindowId { window_id } ) ? ; let image = GpuImage :: from_data ( name . into ( ) , & self . context . device , & self . context . image_bind_group_layout , image . as_image_view ( ) ? , ) ; window . overlays . push ( image ) ; window . window . request_redraw ( ) ; Ok ( ( ) ) }
Add an overlay to a window.
Add an overlay to a window .
&mut self
window_id
WindowId
name
impl Into<String>
image
&impl AsImageView