【梅开二度】修改图片透明度。

3160601781   ·   发表于 2个月前   ·   IAPP
sbp("@b.png",图片)
//载入图片
tcc(图片,"w",宽)
tcc(图片,"h",高)
//获取宽高
javags(ARGB_8888,null,"android.graphics.Bitmap$Config","ARGB_8888")
java(空白图片,null,"android.graphics.Bitmap.createBitmap","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",空白图片)

0 Reply   |  Until 2个月前 | 1740 View
LoginCan Publish Content