MCPcopy Create free account
hub / github.com/cegui/cegui / translate_within

Function translate_within

cegui/src/widgets/MenuItem.cpp:50–65  ·  view source on GitHub ↗

----------------------------------------------------------------------------// translate_within takes two Rectf's. It tries to find the smallest translation which will move the "test rectangle" so that it is witin the "clip rectangle". This is used for popup menu placement. If the test rectangle does not fit (too wide or too tall) then this implementation will prioritize getting the top and left-m

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

computePopupOffsetMethod · 0.85

Calls 4

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

Tested by

no test coverage detected