Paint类

Paint为画笔

常用方法

setARGB(int a, int b, int c, int d) 设置颜色0~255之间的整数
setColor(int color) 可以是常量或者Color.rgb(int , int , int , int )
setAlpha(int a) 透明度0~255之间
setAntiAlias(boolean a)
setDither(boolean b) 是否使用抖动,抖动会使颜色更平滑
setPathEffect(PathEffect effect) 路径效果
setShader(Shader shader) 绘制颜色渐变,
setShadowLayer(float radius, float x, float y, int color) 阴影角度,x,y轴,颜色
setStrokeCap 填充样式
setStrokeJoin 画笔转弯处连接风格
setStrokeWidth 笔触宽度
setStyle 填充风格
setTextAlign 文字对齐方式
setTextSize
setFakeBoldText 是否为粗体
setXfermode 图像重叠时的处理方式

你可能感兴趣的:(Paint类)