如何在img曲线位图周围绘制曲线

时间:2018-10-25 06:49:49

标签: java

如何围绕img曲线bitmap绘制曲线线

此代码弯曲img,我用它弯曲img,我想要弯曲线,我尝试将3 img放在上面,但我有问题,我不喜欢

private Bitmap processImage(Bitmap bitmap) {
    Bitmap bmp;

    bmp = Bitmap.createBitmap(bitmap.getWidth(),
            bitmap.getHeight(), Bitmap.Config.ARGB_8888);
    BitmapShader shader = new BitmapShader(bitmap,
            BitmapShader.TileMode.CLAMP,
            BitmapShader.TileMode.CLAMP);

     Canvas canvas = new Canvas(bmp);
    Paint paint = new Paint();
    paint.setAntiAlias(true);
    paint.setShader(shader);


     RectF rect = new RectF(-bitmap.getWidth() / 2f, 0,
            bitmap.getWidth() / 2f, bitmap.getHeight());
    canvas.drawOval(rect, paint);

    return bmp;
}

0 个答案:

没有答案