Home
last modified time | relevance | path

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

/packages/apps/Launcher2/src/com/android/launcher2/
DUtilities.java74 int sourceWidth = icon.getWidth(); in createIconBitmap() local
76 if (sourceWidth > textureWidth && sourceHeight > textureHeight) { in createIconBitmap()
79 (sourceWidth - textureWidth) / 2, in createIconBitmap()
82 } else if (sourceWidth == textureWidth && sourceHeight == textureHeight) { in createIconBitmap()
116 int sourceWidth = icon.getIntrinsicWidth(); 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()
111 private byte[] createRawData(Bitmap.CompressFormat format, int sourceWidth, in createRawData() argument
114 Bitmap b = Bitmap.createBitmap(sourceWidth, sourceHeight, Bitmap.Config.ARGB_8888); in createRawData()