Bitmap board=BitmapFactory.decodeResource(getResources(), R.drawable.board);
float scalexBoard=this.getWidth()/(float)board.getWidth();
//float scaleyBoard=scalexBoard;
float scaleyBoard=this.getHeight()/5.0f/board.getHeight();
//float scaleyBoard=this.getHeight()/(board.getHeight());
Matrix matrixBoard=new Matrix();
matrixBoard.setScale(scalexBoard, scaleyBoard);
changeBoard= Bitmap.createBitmap(board,0,0,board.getWidth(),board.getHeight(),matrixBoard,true);
android Bitmap 处理
最新推荐文章于 2019-06-24 19:27:21 发布