Convert rect To RectF - Android android.graphics

Android examples for android.graphics:RectF

Description

Convert rect To RectF

Demo Code

import android.graphics.Rect;
import android.graphics.RectF;

public class Main {

  public static RectF rectToRectF(Rect r) {
    return new RectF(r.left, r.top, r.right, r.bottom);
  }/*from w  w  w . j  a  v a2s  . co m*/

}

Related Tutorials