Code example for Bitmap

Methods: getHeightgetWidth

0
        protected void onDraw(Canvas canvas) {
            super.onDraw(canvas);
 
            canvas.drawARGB(255, 255, 255, 255);
 
            final float centerX = getWidth() / 2.0f - mBitmap1.getWidth() / 2.0f;
            final float centerY = getHeight() / 2.0f - mBitmap1.getHeight() / 2.0f;
            final Camera camera = mCamera;
             
            final Matrix matrix = mMatrix;
 
            rotate(centerX, centerY, camera, matrix, 32.0f);
            drawBitmap(canvas, centerX, centerY, 0.0f, matrix);
 
            rotate(centerX, centerY, camera, matrix, 12.0f);
            drawBitmap(canvas, centerX, centerY, -mBitmap1.getWidth(), matrix);
             
            rotate(centerX, centerY, camera, matrix, 52.0f);
            drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth(), matrix);
             
            rotate(centerX, centerY, camera, matrix, 122.0f);
            drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth() * 2.0f, matrix);
             
        } 
 
        private void drawBitmap(Canvas canvas, float centerX, float centerY, float offset,
                Matrix matrix) {