图片的简单的缩放 旋转 平移


        Bitmap ivBitmap = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory()+"/1.png");
        
        Bitmap map = Bitmap.createBitmap(100, 100, ivBitmap.getConfig());
        
        //
        Canvas vas = new Canvas(map);
         
        Paint paint = new Paint();
        
        Matrix matrix = new Matrix();
        matrix.setScale(-1,1,50,50);
        matrix.setTranslate(100, 100);
        matrix.setRotate(30);
        vas.drawBitmap(ivBitmap, matrix, paint);
        
       ImageView findViewById = (ImageView) findViewById(R.id.iv);
       findViewById.setImageBitmap(map);

你可能感兴趣的:(图片的简单的缩放 旋转 平移)