Java tutorial
//package com.java2s; import android.graphics.Point; public class Main { public static Point getNewSizeRatio(double w, int height, int width) { Point point = new Point(); double ratio = height; ratio /= width; point.x = (int) w; point.y = (int) (w * ratio); return point; } }