MCPcopy Create free account
hub / github.com/axmolengine/axmol / getNodeTop

Method getNodeTop

core/ui/LayoutHelper.cpp:1022–1030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1020 return visibleRect.size.width - ptWorld.x;
1021}
1022float LayoutHelper::VisibleRect::getNodeTop(Node* pNode)
1023{
1024 ax::Point ptLocal(
1025 0, LayoutHelper::getNodeBottom(pNode) + pNode->getContentSize().height /* * pNode->getScaleY()*/);
1026 auto ptWorld = pNode->getParent()->convertToWorldSpace(ptLocal);
1027 auto visibleRect = LayoutHelper::VisibleRect::getScreenVisibleRect();
1028
1029 return visibleRect.size.height - ptWorld.y;
1030}
1031
1032void LayoutHelper::VisibleRect::setNodeLeft(Node* pNode, float left)
1033{

Callers

nothing calls this directly

Calls 4

getNodeBottomFunction · 0.85
convertToWorldSpaceMethod · 0.80
getContentSizeMethod · 0.45
getParentMethod · 0.45

Tested by

no test coverage detected