| 1075 | pNode->setPositionX(ptLocal.x); |
| 1076 | } |
| 1077 | void LayoutHelper::VisibleRect::setNodeBottom(Node* pNode, float bottom) |
| 1078 | { |
| 1079 | AX_ASSERT(pNode); |
| 1080 | Vec2 scrSize = Director::getInstance()->getRenderView()->getDesignResolutionSize(); |
| 1081 | ax::Point delta = ax::Vec2(scrSize.width, 0) - LayoutHelper::VisibleRect::rightBottom(); |
| 1082 | Vec2 size = pNode->getContentSize() * getScale2D(pNode); |
| 1083 | ax::Point achorPoint = Vec2::ZERO; |
| 1084 | if (!pNode->isIgnoreAnchorPointForPosition()) |
| 1085 | { |
| 1086 | achorPoint = pNode->getAnchorPoint(); |
| 1087 | } |
| 1088 | ax::Point ptWorld(0, adjust_coord(size.height, achorPoint.y, bottom) - delta.y); |
| 1089 | auto ptLocal = pNode->getParent()->convertToNodeSpace(ptWorld); |
| 1090 | pNode->setPositionY(ptLocal.y); |
| 1091 | } |
| 1092 | |
| 1093 | void LayoutHelper::VisibleRect::setNodeLT(Node* pNode, const ax::Point& p) |
| 1094 | { |
nothing calls this directly
no test coverage detected