Android examples for Graphics:Rectangle
Calculates the y-coordinate of the bottom edge given the other sides of the rectangle and an aspect ratio.
//package com.java2s; public class Main { /**/*from ww w.ja v a2s . co m*/ * Calculates the y-coordinate of the bottom edge given the other sides of * the rectangle and an aspect ratio. */ public static float calculateBottom(float left, float top, float right, float targetAspectRatio) { final float width = right - left; final float bottom = (width / targetAspectRatio) + top; return bottom; } }