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 圖像重疊時的處理方式

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容