title: Skew matrix in Android
body: <p>I'm working on Android project. and I'm using View class to drawing bitmap using canvas with matrix.</p>
  
  <p>How can I skew matrix? to be like this:</p>
  
  <p><img src="https://i.stack.imgur.com/bNtsR.png" alt="enter image description here"></p>
  
  <p>I'm using this code, but it is not working:</p>
  
  <pre><code>float[] src=new float[]{0,0,0,1,1,1,1,0};
  float[] dst=new float[]{0.2f,0,0,1,1,1,0.8f,0};
  Paint paint = new Paint();
  matrix.reset();     
  matrix.postTranslate(-width / 2.0f, -height / 2.0f);        
  matrix.postRotate(0/*(float)(angle*180/Math.PI) ,-width / 2.0f + 50, -height / 2.0f +50*/);
  matrix.postScale(scale, scale); 
  matrix.setPolyToPoly(src, 0, dst, 0, 4);
  matrix.postTranslate(position.getX(), position.getY());             
  canvas.drawBitmap(bitmap, matrix, paint);
  canvas.concat(matrix);
  </code></pre>