RenderTexture scale problem

Hello, I just faced problem with drawing using render texture. It is expressed in incorrect scale of displayed sprites. If I set scale factor equals (1, 1), engine sets different values and draws larger image on the texture.
Look at the added images and code and you will understand what I’m talking about.

using namespace cocos2d;
cocos2d::RenderTexture * tex = RenderTexture::create(256, 256, Texture2D::PixelFormat::RGBA8888);
tex->clear(1, 1, 1, 1);
tex->setPosition(visibleSize.width / 2, visibleSize.height / 2);

Sprite * theSprite = Sprite::create("CloseNormal.png");
theSprite->setAnchorPoint(Point(0, 0));
theSprite->setPosition(0, 0);
theSprite->setScale(1, 1);

tex->begin();
theSprite->visit();
tex->end();

addChild(tex);


Untitled-2.png (160.0 KB)


HelloWorldScene.cpp.zip (1.2 KB)