标签 显示优化 下的文章

LinearGradient 线性渐变

LinearGradient 用来对某一个区域进行线性渐变, 父类为 Shader 构造参数 LinearGradient(float x0, float y0, float x1, float y1, int[] colors, float[] positions, Shader.TileMode tile) // 参数分别为 x0,y0为起始点坐标; x1,y1为结束点坐标; colors为渐变的颜色数组; positions 为颜色数组对应的起始位置, 为null时就是指colors均匀分布; tile 指的就是颜色渐变的平铺方式 LinearGradient(float x0, float y0, float x1, float y1, int color0, int color1, Shader.TileMode tile) // 参 ...