zoukankan      html  css  js  c++  java
  • 将显示对象变成黑白

    //显示对象变成彩色
    private function applyGrayToColour(child:DisplayObject):void {
    var matrix:Array = [];
    matrix = matrix.concat([1,0,0, 0, 0]); // red
    matrix = matrix.concat([0,1,0, 0, 0]); // green
    matrix = matrix.concat([0,0,1, 0, 0]); // blue
    matrix = matrix.concat([0, 0, 0, 1, 0]); // alpha
    applyFilter(child, matrix);
    }

    //显示对象变成黑白
    private function applyGray(child:DisplayObject):void {
    var matrix:Array = [];
    matrix = matrix.concat([0.3086, 0.6094, 0.0820, 0, 0]); // red
    matrix = matrix.concat([0.3086, 0.6094,0.0820, 0, 0]); // green
    matrix = matrix.concat([0.3086, 0.6094, 0.0820, 0, 0]); // blue
    matrix = matrix.concat([0, 0, 0, 0.8, 0]); // alpha
    applyFilter(child, matrix);
    }

  • 相关阅读:
    Java遍历Map、List、Array
    自签名SSL生成
    oracle_round
    Timestamp_时间戳
    oracle_substr
    eval
    orcale_聚合函数
    oracle_decode
    js_JSON
    sql拼接
  • 原文地址:https://www.cnblogs.com/actionkong/p/3586786.html
Copyright © 2011-2022 走看看