将位图转换为Android中的(Graphics。)路径

问题描述 投票:0回答:1

我试图在Android中将位图转换为路径像这样的东西

        Bitmap alpha = bitmap.extractAlpha();
        Path path = BitmapToPath(alpha);

enter image description here

android bitmap android-canvas android-custom-view
1个回答
0
投票

您想在画布上那样绘制,还是要提取路径?如果要在画布上绘画,可以使用Porterduff模式实现]

© www.soinside.com 2019 - 2024. All rights reserved.