package com.sheep.gamegroup.util;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;

import com.sheep.gamegroup.module.find.bean.Size;

/**
 * Created by realicing on 2018/12/4.
 * realicing@sina.com
 */
public class BitmapUtil {
    public static Bitmap createBigLogo(Bitmap bmp, Size size) {
        Bitmap result = Bitmap.createBitmap(size.getWidth(), size.getHeight(), Bitmap.Config.ARGB_4444);
        Canvas canvas = new Canvas(result);
        Paint paint = new Paint();
        Matrix matrix = new Matrix();
        matrix.setTranslate(size.getX(), size.getY());
        canvas.drawBitmap(bmp, matrix, paint);
        return result;
    }
}
