可以使用画布操纵图像吗?我们如何将图像放到画布上?可以使用画布操纵图像
@Override
protected void onDraw(Canvas canvas) {
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
Bitmap mBitmap = bitmap.copy(bitmap.getConfig(), true);
canvas = new Canvas(mBitmap);
Matrix matrix = new Matrix();
canvas.drawBitmap(mBitmap, matrix, mPaint);
}
我无法在屏幕上看到图像。 canvas.drawBitmap()不应该是必须的,因为我使用构造函数并传递mBitmap。
谢谢。我想操纵视频。那么是否有可能将整个场景录制在您的面前,但只能将其中的一半作为预览显示给用户? – Namratha 2010-07-26 06:37:46
请参阅上文。我根据你的建议继续前进,但我无法看到图像。 – Namratha 2010-07-26 09:15:04