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

Method get_image_display_rect

dlib/gui_widgets/widgets.cpp:6084–6100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6082// ----------------------------------------------------------------------------------------
6083
6084 rectangle image_display::
6085 get_image_display_rect (
6086 ) const
6087 {
6088 if (zoom_in_scale != 1)
6089 {
6090 return rectangle(0,0, img.nc()*zoom_in_scale-1, img.nr()*zoom_in_scale-1);
6091 }
6092 else if (zoom_out_scale != 1)
6093 {
6094 return rectangle(0,0, img.nc()/zoom_out_scale-1, img.nr()/zoom_out_scale-1);
6095 }
6096 else
6097 {
6098 return dlib::get_rect(img);
6099 }
6100 }
6101
6102// ----------------------------------------------------------------------------------------
6103

Callers

nothing calls this directly

Calls 4

get_rectFunction · 0.85
rectangleClass · 0.50
ncMethod · 0.45
nrMethod · 0.45

Tested by

no test coverage detected