zoukankan      html  css  js  c++  java
  • Shape 示例

    温故而知新,散装笔记:

    shape的应用

    var size:uint           = 80;
    var bgColor:uint       = 0xFFCC00;
    var borderColor:uint  = 0x666666;
    var borderSize:uint   = 0;
    var cornerRadius:uint = 9;
    var gutter:uint       = 5;
    //画圆
    var child:Shape = new Shape();
    var halfSize:uint = Math.round(size/2);
    child.graphics.beginFill(bgColor);
    child.graphics.lineStyle(borderSize, borderColor);
    child.graphics.drawCircle(halfSize, halfSize, halfSize);
    child.graphics.endFill();
    addChild(child);
    //带圆角的矩形
    var child:Shape = new Shape();
    child.graphics.beginFill(bgColor);
    child.graphics.lineStyle(borderSize, borderColor);
    child.graphics.drawRoundRect(0, 0, size, size, cornerRadius);
    child.graphics.endFill();
    addChild(child);
    //矩形
    var child:Shape = new Shape();
    child.graphics.beginFill(bgColor);
    child.graphics.lineStyle(borderSize, borderColor);
    child.graphics.drawRect(0, 0, size, size);
    child.graphics.endFill();
    addChild(child);
    
  • 相关阅读:
    Java运行环境(win10)
    maven封装jar包遇到的问题
    eclipse安装STS遇到的问题
    Redis IO多路复用的理解
    操作系统文章推荐
    jdk1.8新特性
    Maven笔记
    博主推荐
    MySQL文章推荐
    多线程文章推荐
  • 原文地址:https://www.cnblogs.com/wqing/p/2375989.html
Copyright © 2011-2022 走看看