Wednesday, March 5, 2014

android ImageVIew onDraw inside out pictures and multi-touch


As the need for procedures to set the pixel image is too big, appeared before Bitmap.createBitmap OOM
In the Internet that use canvas, but with no effect after the canvas matrix
Newbie, please advise!
 @ Override 
protected void onDraw (Canvas canvas) {

Rect rect = new Rect (0, 0, (int) imageWidth, (int) imageWidth);

RectF rectf = new RectF (0, 0, 200, 300);

canvas.drawBitmap (bitmap, rect, rectf, null); / / reduce the time how to set matrix

/ / Canvas.drawBitmap (bitmap, matrix, null); / / this will appear 2 Figure

}

<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
canvas also has matrix effect ah, but the entire canvas is larger or smaller Bale.
By canvas.setMatrix
Direct scaling images have not tried, the code is canvas.drawBitmap (bitmap, matrix, paint);
Reply:
cited a floor huanying95 reply:
canvas also has matrix effect ah, but the entire canvas is larger or smaller Bale.
By canvas.setMatrix
Direct scaling images have not tried, the code is canvas.drawBitmap (bitmap, matrix, paint);


This morning themselves, and spent another way, thank you, gave you points.

No comments:

Post a Comment