| 1283 | pNode->setPositionY(ptLocal.y); |
| 1284 | } |
| 1285 | void LayoutHelper::VisibleRect::setNodeNormalizedPosition(Node* pNode, const ax::Point& ratio) |
| 1286 | { |
| 1287 | AX_ASSERT(pNode); |
| 1288 | pNode->setIgnoreAnchorPointForPosition(false); |
| 1289 | pNode->setAnchorPoint(ax::Vec2(.5f, .5f)); |
| 1290 | ax::Rect visibleRect = LayoutHelper::LayoutHelper::VisibleRect::getScreenVisibleRect(); |
| 1291 | ax::Point ptWorld(visibleRect.size.width * ratio.x + visibleRect.origin.x, |
| 1292 | visibleRect.size.height * ratio.y + visibleRect.origin.y); |
| 1293 | auto ptLocal = pNode->getParent()->convertToNodeSpace(ptWorld); |
| 1294 | pNode->setPosition(ptLocal); |
| 1295 | } |
nothing calls this directly
no test coverage detected