// Gameview. drawimage (canvas, mbitdesttop, midtx, mbitqq. getheight (), mbitdesttop. getwidth (), mbitdesttop. getheight ()/2, 0, 0 ); Public Static Void Drawimage (canvas, bitmap BLT, Int X, Int Y, Int W, Int H, Int BX, Int By ){ // X and Y indicate the starting point of painting, Rect src = New Rect (); // Image Rect DST = New Rect (); // Screen position and size // SRC: indicates the size of the painting image. SRC. Left = Bx; // 0, 0 SRC. Top = By; SRC. Right = Bx + W;// Mbitdesttop. getwidth ();, which is the width of the desktop image, SRC. Bottom = by + h; // Mbitdesttop. getheight ()/2; // This is half the height of the desktop image. // The following DST indicates the position of the image to be painted. DST. Left = X; // Midtx, // This can be changed, that is, the starting point X of the drawing. DST. Top = y; // Mbitqq. getheight (); // This is the height of the QQ image. It is equivalent to the Y coordinate of the start point of the desktop image painting. DST. Right = x + W; // Midtx + mbitdesttop. getwidth (); // Indicates the upper right corner of the image to be painted DST. Bottom = Y + h; // Mbitqq. getheight () + mbitdesttop. getheight (); // Indicates the bottom right corner of the image to be painted Canvas. drawbitmap (BLT, SRC, DST, Null ); // The first parameter of this method is the original image size, and the second parameter is the image size to be displayed. That is to say, if you want to paint a certain part of the image, instead of all the images, the third parameter indicates the position of the image. SRC = Null ; DST = Null ;}