9.多彩的幕布layer
- CCLayerCorlor
bool CCLayerColor::initWithColor(const ccColor4B & color);
bool CCLayerColor::initWithColor(const ccColor4B & color, GLfloat w, GLfloat h);
//例子
CCLayerColor::initWithColor(ccc4(, , , ));
CCLayerColor::initWithColor(cc4(, , ), , );
ignoreAnchorPointForPosition(false); - CCLayerGradient
bool CCLayerGradient::initWithColor(const ccColor4B & start, const ccColor4B& end);
bool CCLayerGradient::initWithColor(const ccColor4B & start,const CCLayerGradient, const CCPoint& v);
//例子
CCLayerGradient::initWithColor(ccc4(, , , ), ccc4(, , , ), ccp());
代码例子:
class T4ColorLayer:public CCLayerGradient
{
public:
static CCScene *scene();
CREATE_FUNC(T4ColorLayer);
bool init();
}; bool T4ColorLayer::init()
{
//CCLayerColor::initWithColor(ccc4(255, 255, 255, 255));
CCLayerGradient::initWithColor(ccc4(255, 0, 0, 255), ccc4(0, 0, 255, 255));
return true;
}
运行效果:

9.多彩的幕布layer的更多相关文章
- 关于Layer弹出框初探
layer至今仍作为layui的代表作,她的受众广泛并非偶然,而是这五年多的坚持,不断完善和维护.不断建设和提升社区服务,使得猿们纷纷自发传播,乃至于成为今天的Layui最强劲的源动力.目前,laye ...
- layer.js中layer.tips
<script src="~/Content/js/layer/layer.js"></script> layer.tips('名称不能为空', '#pro ...
- 弹出层layer的使用
弹出层layer的使用 Intro layer是一款web弹层组件,致力于服务各个水平段的开发人员.layer官网:http://layer.layui.com/ layer侧重于用户灵活的自定义,为 ...
- layer弹出信息框API
首先向大家推荐layer,在这里也非常感谢贤心的贡献,非常不错的信息框及弹出层解决方案,为一些项目的前端开发提高了很大的效率,希望layer 越办越好! 下面是API,呵呵,官方抄袭过来的,为了自己看 ...
- 如果layer层在iframe下不居中滚动
需要在layer前面加上parent.layer. 2.运用layer层的步骤: 1.引入1.8版本以上的jquery文件 <script type="text/javascript& ...
- iOS CoreAnimation详解(一) 有关Layer的动画
以前由于项目需要 也写了一些动画 ,但是知识不系统,很散.这段时间趁着项目完成的空袭,来跟着大神的脚步系统的总结一下iOS中Core Animation的知识点. 原博客地址:http://blog. ...
- web 前端常用组件【07】弹出层 Layer
web 项目中总是需要弹出框,来让用户进行下一步的操作. 大到弹出另外一个页面,小到弹出提示.确认等. 经手几个项目,还是感觉 Layer 用起来比较的轻松,你能想到的 Layer 都能帮你做到. 感 ...
- layer.open打开iframe页面的调用父页面方法及关闭
//调用父类方法 window.parent.exportData($('#shownum').val(),$('#splitstr').val()); //关闭iframe页面var index = ...
- layer弹出框小结
1.layer.open() // 1.打开弹出层 layer.open({ type:1, //基本层类型 icon:, //图标 content:'请核对信息!', //内容 shade:0.3, ...
随机推荐
- array.fliter无法正确过滤出我想要的数组
var checked_list = state.files.filter(function(item, id){ // console.log('click the ' + item.id); re ...
- c# IndexOf()用法
IndexOf()用法 查找字符串中字符或者字符串首次出现的位置,返回的是索引值; str1.indexOf('字');//查找“字”在字符串中首次出现的索引值 str1.indexOf(" ...
- nil gogo
https://blog.csdn.net/zhonggaorong/article/details/50233421 https://github.com/KevinHM/FunctionalRea ...
- 洛谷P3332 [ZJOI2013]K大数查询 权值线段树套区间线段树_标记永久化
Code: #include <cstdio> #include <algorithm> #include <string> #include <cstrin ...
- iOS开发—— Couldn't add the Keychain Item
报错:*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn ...
- 端口扫描软件Nmap使用一(下载于安装)
端口扫描软件Nmap使用一(下载于安装) Nmap的下载地址虽然很多,但是对于新手来说,尽量在官方网址下载,某些第三方下载网址很不人道,使用他们加速器的时候会绑定下载很多垃圾软件,会给我们造成很多不必 ...
- [USACO15JAN]草鉴定Grass Cownoisseur(分层图+tarjan)
[USACO15JAN]草鉴定Grass Cownoisseur 题目描述 In an effort to better manage the grazing patterns of his cows ...
- Android 查看CPU及内存
借助getprop.dumpsys来了解一些系统相关信息. 一.getprop adb shell cat /system/build.prop 文件中存放的是用于启动系统时需要的配置文件,通常可以通 ...
- 【Educational Codeforces Round 37 A】 Water The Garden
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 记录下水龙头在哪些位置. 然后每秒钟把index-i和index+i改变状态一下就好(置1 [代码] #include <bi ...
- 【VK Cup 2015 - Finals D】Restructuring Company
[题目链接]:http://codeforces.com/problemset/problem/566/D [题意] 给你n个人; 一开始每个人都隶属于一个部门; 之后给你q个操作; 3种操作类型; ...