Example usage for android.graphics Matrix postSkew

List of usage examples for android.graphics Matrix postSkew

Introduction

In this page you can find the example usage for android.graphics Matrix postSkew.

Prototype

public boolean postSkew(float kx, float ky) 

Source Link

Document

Postconcats the matrix with the specified skew.

Usage

From source file:Main.java

public static Bitmap getSkewBitmap(Bitmap mBitmap, float xRatio, float yRatio) {
    int width = mBitmap.getWidth();
    int height = mBitmap.getHeight();

    Matrix matrix = new Matrix();
    matrix.postSkew(xRatio, yRatio);
    Bitmap mScrewBitmap = Bitmap.createBitmap(mBitmap, 0, 0, width, height, matrix, true);

    return mScrewBitmap;
}