java修改图片透明度
2023-01-24 09:16:15 最后更新
sbp("@b.png",图片)
//载入图片
tcc(图片,"w",宽)
tcc(图片,"h",高)
//获取宽高
javags(ARGB_8888,null,"android.graphics.Bitmap$Config","ARGB_8888")
java(空白图片,null,"android.graphics.Bitmap.*Bitmap","int",宽,"int",高,"android.graphics.Bitmap$Config",ARGB_8888)
//创建新图片
javanew(画布,"android.graphics.Canvas","android.graphics.Bitmap",空白图片)
javanew(画笔,"android.graphics.Paint")
javags(STROKE,null,"android.graphics.Paint$Style","STROKE")
//空心
java(null,画笔,"android.graphics.Paint.setStyle","android.graphics.Paint$Style",STROKE)
//透明度0-100
java(null,画笔,"android.graphics.Paint.setAlpha","int",33)
java(null,画布,"android.graphics.Canvas.drawBitmap","android.graphics.Bitmap",图片,"float",0,"float",0,"android.graphics.Paint",画笔)
//us(id,"src",空白图片)