Java tutorial
//package com.java2s; /* CanvasProfile.java Copyright (c) 2014 NTT DOCOMO,INC. Released under the MIT license http://opensource.org/licenses/mit-license.php */ import android.graphics.Bitmap; import android.graphics.Canvas; public class Main { /** * Draw the image to viewBitmap at the same scale drawing mode. * @param viewBitmap Bitmap to be displayed on the device. * @param bitmap Bitmap image. * @param x x * @param y y */ public static void drawImageForNonScalesMode(final Bitmap viewBitmap, final Bitmap bitmap, final double x, final double y) { float startGridX = (float) x; float startGridY = (float) y; Canvas canvas = new Canvas(viewBitmap); canvas.drawBitmap(bitmap, startGridX, startGridY, null); } }