【发布时间】:2015-05-21 13:34:01
【问题描述】:
我正在使用画布,图像为 1000x500,手机宽度为 480,高度为 800
比例样本:
scale = (float) (height / image.getHeight());
image_width = image.getWidth() * scale;
image_height = image.getHeight() * scale;
如何使用画布绘制这个缩放的图像,只有图像的中心(屏幕大小)可见,而左右两侧在屏幕之外?
【问题讨论】:
-
我建议你看看Displaying Bitmaps Efficiently - 你可能不想浪费内存,它可能有助于回答你的问题。