Code example for RectF

Methods: height, width

0
		mContext = ctx;
	} 
 
	// Returns the cropping rectangle in image space. 
	public RectF getCropRect() {
		final float width = mImageRect.width();
		final float height = mImageRect.height();
 
		return new RectF(mCropRect.left / width, mCropRect.top / height, mCropRect.right / width, mCropRect.bottom
				/ height);
	} 
 
	// Determines which edges are hit by touching at (x, y). 
	public int getHit(float x, float y) {
		Rect r = computeLayout();
		int retval = GROW_NONE;
		final float hysteresis = mTouchHystersis;
 
		// verticalCheck makes sure the position is between the top and 
		// the bottom edge (with some tolerance). Similar for horizCheck. 
		boolean verticalCheck = (y >= r.top - hysteresis) && (y < r.bottom + hysteresis);