| 799 | win w; |
| 800 | |
| 801 | int main() |
| 802 | { |
| 803 | |
| 804 | try |
| 805 | { |
| 806 | |
| 807 | image_window win; |
| 808 | |
| 809 | array2d<unsigned char> img; |
| 810 | img.set_size(100,100); |
| 811 | assign_all_pixels(img,0); |
| 812 | |
| 813 | fill_rect(img, rectangle(1,1,1,1), 255); |
| 814 | fill_rect(img, rectangle(1,3,2,5), 255); |
| 815 | fill_rect(img, rectangle(4,3,5,4), 255); |
| 816 | fill_rect(img, rectangle(9,9,13,10), 255); |
| 817 | |
| 818 | win.set_image(img); |
| 819 | |
| 820 | win.add_overlay(image_display::overlay_rect(rectangle(1,1,1,1), rgb_pixel(255,0,0))); |
| 821 | win.add_overlay(image_display::overlay_rect(rectangle(1,3,2,5), rgb_pixel(255,0,0))); |
| 822 | win.add_overlay(image_display::overlay_rect(rectangle(4,3,5,4), rgb_pixel(255,0,0))); |
| 823 | win.add_overlay(image_display::overlay_rect(rectangle(9,9,13,10), rgb_pixel(255,0,0))); |
| 824 | |
| 825 | |
| 826 | |
| 827 | w.set_pos (100,200); |
| 828 | w.set_title("test window"); |
| 829 | w.show(); |
| 830 | |
| 831 | w.wait_until_closed(); |
| 832 | } |
| 833 | catch (exception& e) |
| 834 | { |
| 835 | cout << e.what() << endl; |
| 836 | } |
| 837 | |
| 838 | } |
nothing calls this directly
no test coverage detected