How to use matrix to set the source rectangle.

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

How to use matrix to set the source rectangle.

Postby tensaix2j » Sat Oct 24, 2009 2:58 pm

What is the equivalent setting in matrix such that i can do

canvas.drawBitmap(BitmapResouce, mMatrix, p);

that can set the source rectangle to be subset of the image that is equivalent to this call

canvas.drawBitmap(BitmapResouce, sourceRectangle, destinationRectangle, null);

Because i need to use the matrix but at the same time i want the source image to be clipped?
Posts: 5
Joined: Tue Jan 06, 2009 7:35 am


Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests