mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:22:45 +00:00 
			
		
		
		
	LibGfx: Remove try_ prefix from bitmap creation functions
				
					
				
			Those don't have any non-try counterpart, so we might as well just omit it.
This commit is contained in:
		
							parent
							
								
									1971bff314
								
							
						
					
					
						commit
						82a152b696
					
				
					 186 changed files with 598 additions and 598 deletions
				
			
		|  | @ -39,7 +39,7 @@ private: | |||
| 
 | ||||
| Canvas::Canvas() | ||||
| { | ||||
|     m_bitmap = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRx8888, { WIDTH, HEIGHT }).release_value_but_fixme_should_propagate_errors(); | ||||
|     m_bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, { WIDTH, HEIGHT }).release_value_but_fixme_should_propagate_errors(); | ||||
|     draw(); | ||||
| } | ||||
| 
 | ||||
|  | @ -107,7 +107,7 @@ void Canvas::draw() | |||
|     painter.draw_line({ 740, 140 }, { 640, 240 }, Color::Red, 5, Gfx::Painter::LineStyle::Solid); | ||||
|     painter.draw_line({ 690, 140 }, { 640, 240 }, Color::Blue, 10, Gfx::Painter::LineStyle::Solid); | ||||
| 
 | ||||
|     auto bg = Gfx::Bitmap::try_load_from_file("/res/html/misc/90s-bg.png"sv).release_value_but_fixme_should_propagate_errors(); | ||||
|     auto bg = Gfx::Bitmap::load_from_file("/res/html/misc/90s-bg.png"sv).release_value_but_fixme_should_propagate_errors(); | ||||
|     painter.draw_tiled_bitmap({ 20, 260, 480, 320 }, *bg); | ||||
| 
 | ||||
|     painter.draw_line({ 40, 480 }, { 20, 260 }, Color::Red); | ||||
|  | @ -128,7 +128,7 @@ void Canvas::draw() | |||
|     path.close(); | ||||
|     painter.fill_path(path, Color::Yellow, Gfx::Painter::WindingRule::EvenOdd); | ||||
| 
 | ||||
|     auto buggie = Gfx::Bitmap::try_load_from_file("/res/graphics/buggie.png"sv).release_value_but_fixme_should_propagate_errors(); | ||||
|     auto buggie = Gfx::Bitmap::load_from_file("/res/graphics/buggie.png"sv).release_value_but_fixme_should_propagate_errors(); | ||||
|     painter.blit({ 280, 280 }, *buggie, buggie->rect(), 0.5); | ||||
|     painter.draw_scaled_bitmap({ 360, 280, buggie->rect().width() * 2, buggie->rect().height() * 2 }, *buggie, buggie->rect()); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Schumacher
						Tim Schumacher