Следующий код - это то, что я получил до сих пор. Однако есть 2 проблемы:
-
Я хочу как внутренние, так и внешние эффекты свечения, которые похожи на параметры смешивания Photoshop. Но мне удалось создать внешнее свечение, если я установил
BlurMaskFilter.Blur.INNER
или другое значение, все изображение заблокировано, а не просто ребрами. -
Несмотря на то, что я устанавливал " FF" как альфа-значение, цвет свечения все еще очень темный.
Bitmap alpha = origin.extractAlpha(); BlurMaskFilter blurMaskFilter = new BlurMaskFilter(5, BlurMaskFilter.Blur.OUTER); Paint paint = new Paint(); paint.setMaskFilter(blurMaskFilter); paint.setColor(0xffffffff); Canvas canvas = new Canvas(origin); canvas.drawBitmap(alpha, 0, 0, paint); return origin;