| 1649 | } |
| 1650 | |
| 1651 | Node::Grabber::RenderPair Node::Grabber::newRenderPair(float width, float height) { |
| 1652 | auto renderTarget = RenderTarget::create( |
| 1653 | s_cast<uint16_t>(width), |
| 1654 | s_cast<uint16_t>(height)); |
| 1655 | auto surface = Sprite::create(renderTarget->getTexture()); |
| 1656 | surface->setAsManaged(); |
| 1657 | surface->setPosition({width / 2.0f, height / 2.0f}); |
| 1658 | surface->setBlendFunc({BlendFunc::One, BlendFunc::Zero}); |
| 1659 | surface->setEffect(SpriteEffect::create()); |
| 1660 | return {MakeRef(renderTarget), MakeRef(surface)}; |
| 1661 | } |
| 1662 | |
| 1663 | void Node::Grabber::grab(Node* target) { |
| 1664 | float width = std::floor(target->getWidth()); // init RT with integer size |
nothing calls this directly
no test coverage detected