mirror of
				https://github.com/vlang/v.git
				synced 2023-08-10 21:13:21 +03:00 
			
		
		
		
	gg: fix native image rendering with with/height=0
This commit is contained in:
		| @@ -283,8 +283,18 @@ pub fn (ctx &Context) draw_image_with_config(config DrawImageConfig) { | ||||
| 				} | ||||
| 				x := config.img_rect.x | ||||
| 				y := config.img_rect.y | ||||
| 				C.darwin_draw_image(x, ctx.height - (y + config.img_rect.height), config.img_rect.width, | ||||
| 					config.img_rect.height, img) | ||||
| 				width := if config.img_rect.width == 0 { | ||||
| 					f32(img.width) | ||||
| 				} else { | ||||
| 					config.img_rect.width | ||||
| 				} | ||||
| 				height := if config.img_rect.height == 0 { | ||||
| 					f32(img.height) | ||||
| 				} else { | ||||
| 					config.img_rect.height | ||||
| 				} | ||||
| 				C.darwin_draw_image(x, ctx.height - (y + config.img_rect.height), width, | ||||
| 					height, img) | ||||
| 				return | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alexander Medvednikov
					Alexander Medvednikov