OverlayObject overlayObject = overlayObjects.get(index);
Bitmap dotIndicator = overlayObject.DTO.dotIndicatorBitmap;
int width = dotIndicator.getWidth();
int height = dotIndicator.getHeight();
Log.d("dotIndicator.getWidth()", "" + width);
Log.d("dotIndicator.getHeight()", "" + height);
Matrix matrix = new Matrix();
matrix.postRotate(gbConstants.dotIndicatorRotationFactor, width/2, height/2);
Bitmap newBitmap = Bitmap.createBitmap(dotIndicator, 0, 0,
width, width, matrix, true);
Log.d("newBitmap.getWidth()", "" + newBitmap.getWidth());
Log.d("newBitmap.getHeight()", "" + newBitmap.getHeight());
ログの結果: 01-15 14:46:16.485: D/dotIndicator.getWidth()(20739): 102 01-15 14:46:16.485: D/dotIndicator.getHeight()(20739): 102 01- 15 14:46:16.485: D/newBitmap.getWidth()(20739): 104 01-15 14:46:16.485: D/newBitmap.getHeight()(20739): 104
01-15 14:46:16.555: D/dotIndicator.getWidth()(20739): 104
01-15 14:46:16.555: D/dotIndicator.getHeight()(20739): 104
01-15 14:46:16.555: D/newBitmap.getWidth()(20739): 106
01-15 14:46:16.555: D/newBitmap.getHeight()(20739): 106
**注: gbConstants.dotIndicatorRotationFactor = 1 (デバッグ用にこの数値を最小値に設定しました)
newBitmap が作成されるたびに、画像が 1 度回転するごとに幅と高さに 2 ピクセルが追加されます。他のリンクや質問を閲覧しましたが、これまでのところ私の質問に答えたものはありません。また、結果に影響を与える可能性のある変数やオブジェクトを参照するメソッドが他にないことを確認するために、何度も何度もデバッグを試みました。前もって感謝します!