MatrixのpostSkewを使えば画像を歪ませられます
java
1class DrawView extends View {
2 Bitmap bmp;
3
4 private Matrix matrix = new Matrix();
5 private Paint paint = new Paint();
6
7 public DrawView(Context context) {
8 super(context);
9 Resources r = getResources();
10 bmp = BitmapFactory.decodeResource(r, R.drawable.image);
11 matrix.postSkew(-0.1f, 0.5f);
12 }
13
14 public void onDraw(Canvas canvas) {
15 canvas.concat(matrix);
16 canvas.drawBitmap(bmp, 0, 0, paint);
17 }
18}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/12/26 10:26
2016/12/26 10:42
2016/12/26 14:10
2016/12/26 15:04
2016/12/26 15:13
2016/12/26 16:31
2016/12/26 23:06