• CCLayerCorlor

    1. bool CCLayerColor::initWithColor(const ccColor4B & color);
    2. bool CCLayerColor::initWithColor(const ccColor4B & color, GLfloat w, GLfloat h);
    3. //例子
    4. CCLayerColor::initWithColor(ccc4(, , , ));
    5. CCLayerColor::initWithColor(cc4(, , ), , );
    6. ignoreAnchorPointForPosition(false);
  • CCLayerGradient
    1. bool CCLayerGradient::initWithColor(const ccColor4B & start, const ccColor4B& end);
    2. bool CCLayerGradient::initWithColor(const ccColor4B & start,const CCLayerGradient, const CCPoint& v);
    3. //例子
    4. CCLayerGradient::initWithColor(ccc4(, , , ), ccc4(, , , ), ccp());

代码例子:

  1. class T4ColorLayer:public CCLayerGradient
  2. {
  3. public:
  4. static CCScene *scene();
  5. CREATE_FUNC(T4ColorLayer);
  6. bool init();
  7. };
  8.  
  9. bool T4ColorLayer::init()
  10. {
  11. //CCLayerColor::initWithColor(ccc4(255, 255, 255, 255));
  12. CCLayerGradient::initWithColor(ccc4(255, 0, 0, 255), ccc4(0, 0, 255, 255));
  13. return true;
  14. }

运行效果:

9.多彩的幕布layer的更多相关文章

  1. 关于Layer弹出框初探

    layer至今仍作为layui的代表作,她的受众广泛并非偶然,而是这五年多的坚持,不断完善和维护.不断建设和提升社区服务,使得猿们纷纷自发传播,乃至于成为今天的Layui最强劲的源动力.目前,laye ...

  2. layer.js中layer.tips

    <script src="~/Content/js/layer/layer.js"></script> layer.tips('名称不能为空', '#pro ...

  3. 弹出层layer的使用

    弹出层layer的使用 Intro layer是一款web弹层组件,致力于服务各个水平段的开发人员.layer官网:http://layer.layui.com/ layer侧重于用户灵活的自定义,为 ...

  4. layer弹出信息框API

    首先向大家推荐layer,在这里也非常感谢贤心的贡献,非常不错的信息框及弹出层解决方案,为一些项目的前端开发提高了很大的效率,希望layer 越办越好! 下面是API,呵呵,官方抄袭过来的,为了自己看 ...

  5. 如果layer层在iframe下不居中滚动

    需要在layer前面加上parent.layer. 2.运用layer层的步骤: 1.引入1.8版本以上的jquery文件 <script type="text/javascript& ...

  6. iOS CoreAnimation详解(一) 有关Layer的动画

    以前由于项目需要 也写了一些动画 ,但是知识不系统,很散.这段时间趁着项目完成的空袭,来跟着大神的脚步系统的总结一下iOS中Core Animation的知识点. 原博客地址:http://blog. ...

  7. web 前端常用组件【07】弹出层 Layer

    web 项目中总是需要弹出框,来让用户进行下一步的操作. 大到弹出另外一个页面,小到弹出提示.确认等. 经手几个项目,还是感觉 Layer 用起来比较的轻松,你能想到的 Layer 都能帮你做到. 感 ...

  8. layer.open打开iframe页面的调用父页面方法及关闭

    //调用父类方法 window.parent.exportData($('#shownum').val(),$('#splitstr').val()); //关闭iframe页面var index = ...

  9. layer弹出框小结

    1.layer.open() // 1.打开弹出层 layer.open({ type:1, //基本层类型 icon:, //图标 content:'请核对信息!', //内容 shade:0.3, ...

随机推荐

  1. WebSocket handshake: Unexpected response code: 404

    在执行    http://www.cnblogs.com/best/p/5695570.html  提供的 websocket时候, 报错了 “WebSocket handshake: Unexpe ...

  2. zookeeper启动闪退

    编辑zkServer.cmd在它的尾行加上 pause      就可以将闪退停住来观察闪退的原因. 遇到Exception in thread "main" java.lang. ...

  3. Win10 + YOLOv3训练VOC数据集-----How to train Pascal VOC Data

    How to train (Pascal VOC Data): Download pre-trained weights for the convolutional layers (154 MB):  ...

  4. Git学习总结(6)——作为一名程序员这些代码托管工具你都知道吗?

    作为一名程序员这些代码托管工具你都知道吗? 作为一名优秀的开发者,大家都会用到代码托管,我本人用的是github,确实github里面有很多很多开源的项目,所以我们目前的创业项目程序员客栈www.pr ...

  5. [Recompose] Stream Props to React Children with RxJS

    You can decouple the parent stream Component from the mapped React Component by using props.children ...

  6. [Python] Boolean Or "Mask" Index Arrays filter with numpy

    NumPy Reference: Indexing Integer array indexing Boolean array indexing Note: The expression a < ...

  7. Linux 下UVC&amp;V4L2技术简单介绍(二)

    通过前文Linux 下UVC&V4L2技术简单介绍(一)我们了解了UVC和V4L2的简单知识. 这里是USB设备的文档描写叙述:http://www.usb.org/developers/do ...

  8. hdu1280 前m大的数(数组下标排序)

    前m大的数 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Subm ...

  9. HDU 5358 First One 数学+尺取法

    多校的题,摆明了数学题,但是没想出来,蠢爆了,之前算了半天的s[i][j]的和,其实是积.其实比赛的时候我连log(s[i][j])+1是s[i][j]的位数都没看出来,说出来都丢人. 知道了这个之后 ...

  10. AndroidTouchEvent总结

    默认状态 布局文件 <?xml version="1.0" encoding="utf-8"?> <com.malinkang.touchsa ...