| 228 | } |
| 229 | |
| 230 | void Node::setAnchor(Vec2 var) { |
| 231 | auto& transform = getTransform(); |
| 232 | transform.anchorX = var.x; |
| 233 | transform.anchorY = var.y; |
| 234 | transform.anchorPointX = var.x * transform.width; |
| 235 | transform.anchorPointY = var.y * transform.height; |
| 236 | markDirty(); |
| 237 | } |
| 238 | |
| 239 | Vec2 Node::getAnchor() const noexcept { |
| 240 | if (_transform) return {_transform->anchorX, _transform->anchorY}; |
no test coverage detected