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

Function scale_rect

dlib/geometry/drectangle.h:444–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442 }
443
444 inline const drectangle scale_rect (
445 const drectangle& rect,
446 double scale
447 )
448 {
449 DLIB_ASSERT(scale > 0, "scale factor must be > 0");
450
451 double l = rect.left() * scale;
452 double t = rect.top() * scale;
453 double r = rect.right() * scale;
454 double b = rect.bottom() * scale;
455 return drectangle(l, t, r, b);
456 }
457
458 inline drectangle set_rect_area (
459 const drectangle& rect,

Callers

nothing calls this directly

Calls 5

drectangleClass · 0.70
leftMethod · 0.45
topMethod · 0.45
rightMethod · 0.45
bottomMethod · 0.45

Tested by

no test coverage detected