{"title":"Cocos2d-x \u3067setScale\u3068setContentSize\u306e\u6319\u52d5\u306e\u9055\u3044","provider_name":"Hatena Blog","blog_title":"PG\u65e5\u8a8c","categories":["C++","Cocos2d-x"],"url":"https://takap-tech.com/entry/2018/04/26/033300","version":"1.0","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2018%2F04%2F26%2F033300\" title=\"Cocos2d-x \u3067setScale\u3068setContentSize\u306e\u6319\u52d5\u306e\u9055\u3044 - PG\u65e5\u8a8c\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"Takachan","width":"100%","blog_url":"https://takap-tech.com/","published":"2018-04-26 03:33:00","author_url":"https://blog.hatena.ne.jp/Takachan/","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/T/Takachan/20180425/20180425231627.jpg","provider_url":"https://hatena.blog","height":"190","description":"\u3059\u3050\u5fd8\u308c\u308b\u306e\u3067\u30e1\u30e2\u4ee3\u308f\u308a\u306b\u307e\u3068\u3066\u3044\u307e\u3059\u3002 Cocos2d-x\u3067\u3001Sprite\u306b\u5bfe\u3057\u3066\u30b5\u30a4\u30ba\u5909\u66f4\u3059\u308b\u3068\u304d\u306b\u3001setContentSize(), setScale()\u5404\u3005\u3092\u5b9f\u884c\u3057\u305f\u6642\u306e\u6319\u52d5\u306e\u9055\u3044\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3002 \u307e\u305a\u3001100x100px\u306e\u5927\u304d\u3055\u306e\u753b\u50cf\u3092\u8aad\u307f\u8fbc\u3080\u3002 Sprite* sp = Sprite::create(\"100x100.png\"); setContentSize()\u30672\u500d\u306e\u5927\u304d\u3055\u3092\u6307\u5b9a\u3059\u308b\u3002 \u3053\u306e\u6642\u306fSize\u306f\u6307\u5b9a\u3057\u305f\u901a\u308a\u306e\u5024\u306b\u306a\u3063\u3066\u62e1\u5927\u73871\u500d sp->setContentSize(sp->getContentSize() * 2); Size size = sp->getCont\u2026"}