1

このコードを使用して、任意の画像でマップを作成しました:

icon_pin = BitmapFactory.decodeResource(getApplicationContext().getResources(), R.drawable.arrow);
int w = icon_pin.getWidth();
int h = icon_pin.getHeight();
Bitmap.Config conf = Bitmap.Config.ARGB_8888;

Bitmap bmp = Bitmap.createBitmap(w, h, conf); 


final float centerX = w / 2.0f;
final float centerY = h / 2.0f;

Canvas canvas = new Canvas(bmp);
canvas.rotate(m.getDirection(), centerX, centerY);

canvas.drawBitmap(icon_pin, new Matrix(), null);

しかし、画像を回転させると、結果は非常に粗くなります (この例の緑色の矢印のように: http://img837.imageshack.us/img837/4624/screenshot2013052111381.png )

私は何か間違っていますか?定義を改善することは可能ですか?

4

1 に答える 1