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

Function translate_rect

dlib/geometry/drectangle.h:367–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365
366 template <typename T>
367 inline drectangle translate_rect (
368 const drectangle& rect,
369 const dlib::vector<T,2>& p
370 )
371 {
372 drectangle result;
373 result.top () = rect.top() + p.y();
374 result.bottom () = rect.bottom() + p.y();
375 result.left () = rect.left() + p.x();
376 result.right () = rect.right() + p.x();
377 return result;
378 }
379
380 inline drectangle intersect (
381 const drectangle& a,

Callers

nothing calls this directly

Calls 4

topMethod · 0.45
bottomMethod · 0.45
leftMethod · 0.45
rightMethod · 0.45

Tested by

no test coverage detected