首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

Paint种常用方法

2012-09-23 
Paint类常用方法Paint类常用方法:voidsetARGB(int a, int r, int g, int b)设置Paint对象颜色,参数一为alp

Paint类常用方法
Paint类常用方法:

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)  //设置下划线

热点排行