cocos版本是3.17.1
左边的是直接创建的sprite
auto testSprite = cocos2d::CCSprite::create("button-normal.png");
this->addChild(testSprite);
testSprite->setPosition(300, 300);
testSprite->setCenterRect(Rect(20,9,14,9));
testSprite->setContentSize(Size(150, 200));
右边是UI里的GImage