pub fn window_image_info(&self, window_id: WindowId) -> Result<Option<(ImageInfo, Rectangle)>, InvalidWindowId> {
		let window = self.context.windows.iter().find(|x| x.id() == window_id).ok_or(InvalidWindowId { window_id })?;
		let image_info = match window.image.as_ref().map(|x| *x.info()) {
			Some(x) => x,
			None => return Ok(None),
		};

		let uniforms = window.calculate_uniforms();
		let window_size = window.window.inner_size();

		let [x, y] = uniforms.offset;
		let [width, height] = uniforms.relative_size;

		let x = (x * window_size.width as f32) as i32;
		let y = (y * window_size.height as f32) as i32;
		let width = (width * window_size.width as f32) as u32;
		let height = (height * window_size.height as f32) as u32;

		let image_area = Rectangle::from_xywh(x, y, width, height);

		Ok(Some((image_info, image_area)))
	}
/// Get the image info and the area where the image is drawn for a window.
Get the image info and the area where the image is drawn for a window.
Get the image info and the area where the image is drawn for a window .
pub fn window_image_info(&self, window_id: WindowId) -> Result<Option<(ImageInfo, Rectangle)>, InvalidWindowId> {
		let window = self.context.windows.iter().find(|x| x.id() == window_id).ok_or(InvalidWindowId { window_id })?;
		let image_info = match window.image.as_ref().map(|x| *x.info()) {
			Some(x) => x,
			None => return Ok(None),
		};
		let uniforms = window.calculate_uniforms();
		let window_size = window.window.inner_size();
		let [x, y] = uniforms.offset;
		let [width, height] = uniforms.relative_size;
		let x = (x * window_size.width as f32) as i32;
		let y = (y * window_size.height as f32) as i32;
		let width = (width * window_size.width as f32) as u32;
		let height = (height * window_size.height as f32) as u32;
		let image_area = Rectangle::from_xywh(x, y, width, height);
		Ok(Some((image_info, image_area)))
	}
pub fn window_image_info ( & self , window_id : WindowId ) -> Result < Option < ( ImageInfo , Rectangle ) > , InvalidWindowId > { let window = self . context . windows . iter ( ) . find ( | x | x . id ( ) == window_id ) . ok_or ( InvalidWindowId { window_id } ) ? ; let image_info = match window . image . as_ref ( ) . map ( | x | * x . info ( ) ) { Some ( x ) => x , None => return Ok ( None ) , } ; let uniforms = window . calculate_uniforms ( ) ; let window_size = window . window . inner_size ( ) ; let [ x , y ] = uniforms . offset ; let [ width , height ] = uniforms . relative_size ; let x = ( x * window_size . width as f32 ) as i32 ; let y = ( y * window_size . height as f32 ) as i32 ; let width = ( width * window_size . width as f32 ) as u32 ; let height = ( height * window_size . height as f32 ) as u32 ; let image_area = Rectangle :: from_xywh ( x , y , width , height ) ; Ok ( Some ( ( image_info , image_area ) ) ) }
Get the image info and the area where the image is drawn for a window.
Get the image info and the area where the image is drawn for a window .
&self
window_id
WindowId