关于Paint的setColor(int color)方法

来源:互联网 发布:国家统计局进度数据库 编辑:程序博客网 时间:2024/06/01 22:15

定义好的颜色值为private int indicatorColor = 0xff9900;

我在调用setColor方法时,传入indicatorColor ,透明的,??????

看了下源码,是这样定义的

/**     * Set the paint's color. Note that the color is an int containing alpha     * as well as r,g,b. This 32bit value is not premultiplied, meaning that     * its alpha can be any value, regardless of the values of r,g,b.     * See the Color class for more details.     *     * @param color The new color (including alpha) to set in the paint.     */    public native void setColor(int color);
设置的颜色值要包括透明度的 ,否则就视为透明的。

3 0
原创粉丝点击