scale RectF - Android android.graphics

Android examples for android.graphics:RectF

Description

scale RectF

Demo Code

import android.graphics.RectF;

public class Main {

  static void scaleRect(RectF rectF, float scale) {
    scaleRect(rectF, scale, scale);// w ww.  jav a 2  s . c o m
  }

  static void scaleRect(RectF rectF, float scaleX, float scaleY) {
    rectF.left *= scaleX;
    rectF.top *= scaleY;
    rectF.right *= scaleX;
    rectF.bottom *= scaleY;
  }
}

Related Tutorials