Home
last modified time | relevance | path

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

/packages/apps/Launcher2/src/com/android/launcher2/
DUtilities.java73 int sourceWidth = icon.getWidth(); in createIconBitmap() local
75 if (sourceWidth > textureWidth && sourceHeight > textureHeight) { in createIconBitmap()
78 (sourceWidth - textureWidth) / 2, in createIconBitmap()
81 } else if (sourceWidth == textureWidth && sourceHeight == textureHeight) { in createIconBitmap()
115 int sourceWidth = icon.getIntrinsicWidth(); in createIconBitmap() local
117 if (sourceWidth > 0 && sourceHeight > 0) { in createIconBitmap()
119 if (width < sourceWidth || height < sourceHeight) { in createIconBitmap()
121 final float ratio = (float) sourceWidth / sourceHeight; in createIconBitmap()
122 if (sourceWidth > sourceHeight) { in createIconBitmap()
124 } else if (sourceHeight > sourceWidth) { in createIconBitmap()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
DImageRequestDescriptor.java35 public final int sourceWidth; field in ImageRequestDescriptor
77 final int desiredHeight, final int sourceWidth, final int sourceHeight, in ImageRequestDescriptor() argument
82 Assert.isTrue(sourceWidth == ImageRequest.UNSPECIFIED_SIZE || sourceWidth > 0); in ImageRequestDescriptor()
86 this.sourceWidth = sourceWidth; in ImageRequestDescriptor()
111 public void updateSourceDimensions(final int sourceWidth, final int sourceHeight) { in updateSourceDimensions() argument
DMessagePartImageRequestDescriptor.java43 final int desiredWidth, final int desiredHeight, final int sourceWidth, in MessagePartImageRequestDescriptor() argument
45 super(contentUri, desiredWidth, desiredHeight, sourceWidth, sourceHeight, in MessagePartImageRequestDescriptor()
60 updatedWidth != sourceWidth && updatedHeight != sourceHeight) { in updateSourceDimensions()
DVideoThumbnailRequestDescriptor.java26 int desiredHeight, int sourceWidth, int sourceHeight) { in VideoThumbnailRequestDescriptor() argument
27 super(UriUtil.getUriForResourceFile(path), desiredWidth, desiredHeight, sourceWidth, in VideoThumbnailRequestDescriptor() local
DFileImageRequestDescriptor.java47 final int desiredHeight, final int sourceWidth, final int sourceHeight, in FileImageRequestDescriptor() argument
49 super(UriUtil.getUriForResourceFile(path), desiredWidth, desiredHeight, sourceWidth, in FileImageRequestDescriptor() local
DUriImageRequestDescriptor.java59 final int desiredHeight, final int sourceWidth, final int sourceHeight, in UriImageRequestDescriptor() argument
62 super(desiredWidth, desiredHeight, sourceWidth, sourceHeight, isStatic, in UriImageRequestDescriptor()
DImageRequest.java138 final boolean unknownSize = mDescriptor.sourceWidth == UNSPECIFIED_SIZE || in loadBitmapInternal()
174 options.outWidth = mDescriptor.sourceWidth; in loadBitmapInternal()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/tools/
DIconFactory.java47 int sourceWidth = sourceImage.getWidth(); in createIcon() local
50 if (sourceWidth == 0 || sourceHeight == 0 || iconWidth == 0 || iconHeight == 0) { in createIcon()
74 int sourceWidth = sourceImage.getWidth(); in drawIcon() local
79 if (sourceWidth == 0 || sourceHeight == 0 || iconWidth == 0 || iconHeight == 0) { in drawIcon()
89 srcRect = new Rect(0, 0, sourceWidth, sourceHeight); in drawIcon()
92 float wScale = sourceWidth / (float) iconWidth; in drawIcon()
99 float borderW = (sourceWidth - iw) / 2.0f; in drawIcon()
/packages/apps/Messaging/src/com/android/messaging/ui/
DPlaceholderInsetDrawable.java44 final int sourceWidth, final int sourceHeight) { in fromDrawable() argument
47 final int insetHorizontal = drawableWidth < 0 || drawableWidth > sourceWidth ? in fromDrawable()
48 0 : (sourceWidth - drawableWidth) / 2; in fromDrawable()
52 insetHorizontal, insetVertical, sourceWidth, sourceHeight); in fromDrawable()
57 final int sourceWidth, final int sourceHeight) { in PlaceholderInsetDrawable() argument
59 mSourceWidth = sourceWidth; in PlaceholderInsetDrawable()
DAsyncImageView.java164 if (descriptor.sourceWidth != ImageRequest.UNSPECIFIED_SIZE && in maybeSetupPlaceholderDrawable()
171 descriptor.sourceWidth, descriptor.sourceHeight)); in maybeSetupPlaceholderDrawable()
/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()
/packages/apps/Messaging/src/com/android/messaging/datamodel/data/
DGalleryGridItemData.java74 int sourceWidth = cursor.getInt(INDEX_WIDTH); in bind() local
78 if (sourceWidth <= 0) { in bind()
79 sourceWidth = ImageRequest.UNSPECIFIED_SIZE; in bind()
92 sourceWidth, in bind()
115 mImageData.uri, mImageData.sourceWidth, mImageData.sourceHeight); in constructMessagePartData()
/packages/apps/Launcher3/src/com/android/launcher3/graphics/
DLauncherIcons.java250 int sourceWidth = icon.getIntrinsicWidth(); in createIconBitmap() local
252 if (sourceWidth > 0 && sourceHeight > 0) { in createIconBitmap()
254 final float ratio = (float) sourceWidth / sourceHeight; in createIconBitmap()
255 if (sourceWidth > sourceHeight) { in createIconBitmap()
257 } else if (sourceHeight > sourceWidth) { in createIconBitmap()
/packages/apps/Contacts/src/com/android/contacts/
DDynamicShortcuts.java378 final int sourceWidth = bitmapDecoder.getWidth(); in decodeStreamForShortcut() local
385 BitmapUtil.findOptimalSampleSize(sourceWidth, mIconSize), in decodeStreamForShortcut()
390 final int scaledWidth = sourceWidth / opts.inSampleSize; in decodeStreamForShortcut()
406 sourceWidth - prescaledXOffset, sourceHeight - prescaledYOffset in decodeStreamForShortcut()
/packages/services/BuiltInPrintService/jni/plugins/
Dwprint_image.c310 float sourceHeight, sourceWidth; in wprint_image_set_output_properties() local
314 sourceWidth = image_output_width * 1.0f; in wprint_image_set_output_properties()
322 rw = (targetHeight * sourceWidth) / sourceHeight; in wprint_image_set_output_properties()
334 image_info->scaled_height = (int) floorf(targetWidth * sourceHeight / sourceWidth); in wprint_image_set_output_properties()
Dlib_pclm.c188 page_info->sourceWidth = (float) pixel_width / job_info->standard_scale; in _start_page()
191 page_info->sourceWidth, page_info->sourceHeight); in _start_page()
Dlib_pwg.c245 page_info->sourceWidth = (float) pixel_width / job_info->standard_scale; in _start_page()
248 page_info->sourceWidth, page_info->sourceHeight); in _start_page()
/packages/apps/Messaging/src/com/android/messaging/util/
DImageUtils.java827 final int sourceWidth = source.getWidth(); in scaleCenterCrop() local
833 final float xScale = (float) newWidth / sourceWidth; in scaleCenterCrop()
838 final float scaledWidth = scale * sourceWidth; in scaleCenterCrop()
/packages/services/BuiltInPrintService/jni/plugins/genPCLm/inc/
Dcommon_defines.h162 float sourceWidth; member