Searched refs:toCrop (Results 1 – 1 of 1) sorted by relevance
38 public static Bitmap centerCrop(Bitmap recycled, Bitmap toCrop, int width, int height) { in centerCrop() argument39 if (toCrop == null) { in centerCrop()41 } else if (toCrop.getWidth() == width && toCrop.getHeight() == height) { in centerCrop()42 return toCrop; in centerCrop()48 if (toCrop.getWidth() * height > width * toCrop.getHeight()) { in centerCrop()49 scale = (float) height / (float) toCrop.getHeight(); in centerCrop()50 dx = (width - toCrop.getWidth() * scale) * 0.5f; in centerCrop()52 scale = (float) width / (float) toCrop.getWidth(); in centerCrop()53 dy = (height - toCrop.getHeight() * scale) * 0.5f; in centerCrop()62 result = Bitmap.createBitmap(width, height, toCrop.getConfig() == null in centerCrop()[all …]