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

Method wrap_around

dlib/gui_widgets/widgets.cpp:1881–1894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1879// ----------------------------------------------------------------------------------------
1880
1881 void named_rectangle::
1882 wrap_around (
1883 const rectangle& r
1884 )
1885 {
1886 auto_mutex M(m);
1887 rectangle old(rect);
1888 const unsigned long pad = name_height/2;
1889
1890 rect = rectangle(r.left()-pad, r.top()-name_height*4/3, r.right()+pad, r.bottom()+pad);
1891
1892 make_name_fit_in_rect();
1893 parent.invalidate_rectangle(rect+old);
1894 }
1895
1896// ----------------------------------------------------------------------------------------
1897

Callers

nothing calls this directly

Calls 5

rectangleClass · 0.50
leftMethod · 0.45
topMethod · 0.45
rightMethod · 0.45
bottomMethod · 0.45

Tested by

no test coverage detected