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

Method adjust_total_rect

dlib/gui_widgets/widgets.cpp:4912–4923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4910// ----------------------------------------------------------------------------------------
4911
4912 void text_box::
4913 adjust_total_rect (
4914 )
4915 {
4916 const unsigned long padding = style->get_padding(*mfont);
4917 unsigned long text_width;
4918 unsigned long text_height;
4919
4920 mfont->compute_size(text_, text_width, text_height);
4921
4922 set_total_rect_size(text_width + padding*2, text_height + padding*2);
4923 }
4924
4925// ----------------------------------------------------------------------------------------
4926

Callers

nothing calls this directly

Calls 2

compute_sizeMethod · 0.80
get_paddingMethod · 0.45

Tested by

no test coverage detected