• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
xxhong
经验教训远比技术重要
博客园 首页 新随笔 联系 管理

2012年11月27日

cocos2d-x CCSprite自动拉伸全屏
摘要: CCSize size = CCDirector::sharedDirector()->getWinSize();CCSprite* pSprite = CCSprite::create("bg.jpg");pSprite->setPosition(ccp(size.width/2, size.height/2));float winw = size.width; //获取屏幕宽度float winh = size.height;//获取屏幕高度float spx = pSprite->getTextureRect().getMaxX();float sp 阅读全文
posted @ 2012-11-27 14:02 xxhong 阅读(2691) 评论(1) 推荐(0)
 
cocos2d-x CCSprite自动拉伸全屏
摘要: CCSize size = CCDirector::sharedDirector()->getWinSize();CCSprite* pSprite = CCSprite::create("bg.jpg");pSprite->setPosition(ccp(size.width/2, size.height/2));float winw = size.width;float winh = size.height;float spx = pSprite->getTextureRect().getMaxX();float spy = pSprite->g 阅读全文
posted @ 2012-11-27 13:59 xxhong 阅读(321) 评论(0) 推荐(0)
 
 

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3