图片绘制
- 图片绘制 推荐度:
- 相关推荐
图片绘制
一般使用CCSprite
四步骤:
1、初始化
2、检测
3、设置坐标点
4、加入当前图层
代码:
// Add add a splash screen, show the cocos2d splash image.CCSprite* pSprite = CCSprite::create("test.png");CC_BREAK_IF(! pSprite);// Place the sprite on the center of the screenpSprite->setPosition(ccp(size.width/2, size.height/2));// Add the sprite to HelloWorld layer as a child layer.this->addChild(pSprite, 0);
最新文章
- 俞敏洪的一分钟励志演讲
- SNMP
- module 与 component 的区别
- Power BI业绩杜邦分析
- 回溯法
- 文本长度过长时隐藏并显示省略号“...”,以及鼠标停留时悬浮显示全部文本(兼容IE)
- Gallery3D
- mmap 详解
- Specification 参数的用法
- 看门狗的使用与原理
- SAR成像系列:【8】合成孔径雷达(SAR)成像算法
- java鬼混笔记:springboot 5、springboot的Scheduled定时器:fixedDelay和fixedRate区别
- 最小二乘支持向量机(lssvm)回归预测(matlab)
- atoi和itoa(头文件stdilb.h)的C实现
- Matlab中interp2和interpn的差异
- matlab自带的插值函数interp1的四种插值方法
- Android Studio Error:前言中不允许有内容
- https 双向认证开发实践
- AnacondaConda创建环境时报错的解决方案
- Qt数据库:(三)利用QSqlQuery类执行SQL语句(一)