void  setARGB(int a, int r, int g, int b)  设置Paint对象颜色,参数一为alpha透明通道

void  setAlpha(int a)  设置alpha不透明度,范围为0~255

void  setAntiAlias(boolean aa)  //是否抗锯齿

void  setColor(int color)  //设置颜色,这里Android内部定义的有Color类包含了一些常见颜色定义
 . 
void  setFakeBoldText(boolean fakeBoldText)  //设置伪粗体文本
  
void  setLinearText(boolean linearText)  //设置线性文本
 
PathEffect  setPathEffect(PathEffect effect)  //设置路径效果
 
Rasterizer  setRasterizer(Rasterizer rasterizer) //设置光栅化
 
Shader  setShader(Shader shader)  //设置阴影 

void  setTextAlign(Paint.Align align)  //设置文本对齐

void  setTextScaleX(float scaleX)  //设置文本缩放倍数,1.0f为原始
  
void  setTextSize(float textSize)  //设置字体大小
 
Typeface  setTypeface(Typeface typeface)  //设置字体,Typeface包含了字体的类型,粗细,还有倾斜、颜色等。

 void  setUnderlineText(boolean underlineText)  //设置下划线


Paint paint = new Paint();
 
       paint.setAntiAlias(true);          //防锯齿
        paint.setDither(true);            //防抖动
        paint.setStyle(Paint.Style.STROKE);          //画笔类型 STROKE空心 FILL 实心

相关文章:

  • 2021-04-16
  • 2022-12-23
  • 2021-08-17
  • 2021-11-23
  • 2022-01-15
  • 2021-05-25
  • 2021-10-30
猜你喜欢
  • 2021-10-03
  • 2022-01-14
  • 2022-02-01
  • 2022-12-23
  • 2021-04-25
  • 2021-12-01
  • 2021-07-17
相关资源
相似解决方案