MCPcopy Create free account
hub / github.com/davisking/dlib / main

Function main

dlib/test/gui/main.cpp:801–838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

799win w;
800
801int 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}

Callers

nothing calls this directly

Calls 11

assign_all_pixelsFunction · 0.85
rgb_pixelClass · 0.85
fill_rectFunction · 0.50
rectangleClass · 0.50
overlay_rectClass · 0.50
set_sizeMethod · 0.45
set_imageMethod · 0.45
add_overlayMethod · 0.45
set_posMethod · 0.45
showMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected