当前位置:操作系统 > 安卓/Android >>

Android--LinearGradient线性渐变

 
 
[html]  
Paint paint = new Paint();  
        LinearGradient gradient = new LinearGradient(0, 0, 100, 100, Color.RED, Color.YELLOW, Shader.TileMode.MIRROR);  
        paint.setShader(gradient);  
        canvas.drawRect(0, 0, 100, 100, paint);  
        canvas.drawText("This is the shader", 100, 100, paint);  
 
 
补充:移动开发 , Android ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,