Home
last modified time | relevance | path

Searched refs:sourceHeight (Results 1 – 2 of 2) sorted by relevance

/packages/apps/Launcher2/src/com/android/launcher2/
DUtilities.java75 int sourceHeight = icon.getHeight(); in createIconBitmap() local
76 if (sourceWidth > textureWidth && sourceHeight > textureHeight) { in createIconBitmap()
80 (sourceHeight - textureHeight) / 2, in createIconBitmap()
82 } else if (sourceWidth == textureWidth && sourceHeight == textureHeight) { in createIconBitmap()
117 int sourceHeight = icon.getIntrinsicHeight(); in createIconBitmap() local
118 if (sourceWidth > 0 && sourceHeight > 0) { in createIconBitmap()
120 if (width < sourceWidth || height < sourceHeight) { in createIconBitmap()
122 final float ratio = (float) sourceWidth / sourceHeight; in createIconBitmap()
123 if (sourceWidth > sourceHeight) { in createIconBitmap()
125 } else if (sourceHeight > sourceWidth) { in createIconBitmap()
[all …]
/packages/apps/Contacts/tests/src/com/android/contacts/util/
DBitmapUtilTests.java103 private byte[] createJpegRawData(int sourceWidth, int sourceHeight) throws IOException { in createJpegRawData() argument
104 return createRawData(Bitmap.CompressFormat.JPEG, sourceWidth, sourceHeight); in createJpegRawData()
107 private byte[] createPngRawData(int sourceWidth, int sourceHeight) throws IOException { in createPngRawData() argument
108 return createRawData(Bitmap.CompressFormat.PNG, sourceWidth, sourceHeight); in createPngRawData()
112 int sourceHeight) throws IOException { in createRawData() argument
114 Bitmap b = Bitmap.createBitmap(sourceWidth, sourceHeight, Bitmap.Config.ARGB_8888); in createRawData()