| 702 | } |
| 703 | |
| 704 | void SampleApp::OnMirrorImageClick() { |
| 705 | auto image = m_image->GetImage(); |
| 706 | |
| 707 | for( unsigned int height_index = 0; height_index < image.getSize().y; ++height_index ) { |
| 708 | for( unsigned int width_index = 0; width_index < image.getSize().x / 2; ++width_index ) { |
| 709 | auto color0 = image.getPixel( { width_index, height_index } ); |
| 710 | auto color1 = image.getPixel( { image.getSize().x - width_index - 1, height_index } ); |
| 711 | image.setPixel( { width_index, height_index }, color1 ); |
| 712 | image.setPixel( { image.getSize().x - width_index - 1, height_index }, color0 ); |
| 713 | } |
| 714 | } |
| 715 | |
| 716 | m_image->SetImage( image ); |
| 717 | } |
| 718 | |
| 719 | void SampleApp::OnSwitchRendererClick() { |
| 720 | if( sfg::Renderer::Get().GetName() == "Non-Legacy Renderer" ) { |