Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Rect; public class Main { public static Rect buildRect(Bitmap bitmap, int left, int top) { return new Rect(left, top, left + bitmap.getWidth(), top + bitmap.getHeight()); } }