I draw primitive (rectangle with rounded corners 50x50 px) to memory, created Texture2D from raw pixels, and created Sprite from Texture2D, on the IOS screen rectangle is 53 pixels (scale factor 1.0) and pixels near borders changed alpha (please see screenshot).
So the question is why that transformation happens, and how to disable it?
Texture2D* tex = new (std::nothrow) Texture2D();
tex->initWithData( bitmap.getPixels(), widthheight4, Texture2D::PixelFormat::RGBA8888, width, height, Size() );
auto tempFactor = Director::getInstance()->getContentScaleFactor();
Director::getInstance()->setContentScaleFactor( 1.0f );
Sprite* test = Sprite::createWithTexture( tex );
test->setBlendFunc( BlendFunc::ALPHA_PREMULTIPLIED );
test->setPosition( getCenterPosition().x, getCenterPosition().y + 100.0f );
addChild( test, 5555 );
Director::getInstance()->setContentScaleFactor( tempFactor );

