/external/libgdx/gdx/src/com/badlogic/gdx/utils/ |
Scaling.java | 51 public Vector2 apply (float sourceWidth, float sourceHeight, float targetWidth, float targetHeight) {
55 float sourceRatio = sourceHeight / sourceWidth;
56 float scale = targetRatio > sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;
57 temp.x = sourceWidth * scale;
63 float sourceRatio = sourceHeight / sourceWidth;
64 float scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;
65 temp.x = sourceWidth * scale;
70 float scale = targetWidth / sourceWidth;
71 temp.x = sourceWidth * scale;
77 temp.x = sourceWidth * scale; [all...] |
/packages/apps/Messaging/src/com/android/messaging/ui/ |
PlaceholderInsetDrawable.java | 44 final int sourceWidth, final int sourceHeight) { 47 final int insetHorizontal = drawableWidth < 0 || drawableWidth > sourceWidth ? 48 0 : (sourceWidth - drawableWidth) / 2; 52 insetHorizontal, insetVertical, sourceWidth, sourceHeight); 57 final int sourceWidth, final int sourceHeight) { 59 mSourceWidth = sourceWidth;
|
AsyncImageView.java | 164 if (descriptor.sourceWidth != ImageRequest.UNSPECIFIED_SIZE && 171 descriptor.sourceWidth, descriptor.sourceHeight));
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/tools/ |
IconFactory.java | 47 int sourceWidth = sourceImage.getWidth(); 50 if (sourceWidth == 0 || sourceHeight == 0 || iconWidth == 0 || iconHeight == 0) { 74 int sourceWidth = sourceImage.getWidth(); 79 if (sourceWidth == 0 || sourceHeight == 0 || iconWidth == 0 || iconHeight == 0) { 89 srcRect = new Rect(0, 0, sourceWidth, sourceHeight); 92 float wScale = sourceWidth / (float) iconWidth; 99 float borderW = (sourceWidth - iw) / 2.0f;
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/ |
ImageRequestDescriptor.java | 35 public final int sourceWidth; 77 final int desiredHeight, final int sourceWidth, final int sourceHeight, 82 Assert.isTrue(sourceWidth == ImageRequest.UNSPECIFIED_SIZE || sourceWidth > 0); 86 this.sourceWidth = sourceWidth; 111 public void updateSourceDimensions(final int sourceWidth, final int sourceHeight) {
|
VideoThumbnailRequestDescriptor.java | 26 int desiredHeight, int sourceWidth, int sourceHeight) { 27 super(UriUtil.getUriForResourceFile(path), desiredWidth, desiredHeight, sourceWidth,
|
MessagePartImageRequestDescriptor.java | 43 final int desiredWidth, final int desiredHeight, final int sourceWidth, 45 super(contentUri, desiredWidth, desiredHeight, sourceWidth, sourceHeight, 60 updatedWidth != sourceWidth && updatedHeight != sourceHeight) {
|
FileImageRequestDescriptor.java | 47 final int desiredHeight, final int sourceWidth, final int sourceHeight, 49 super(UriUtil.getUriForResourceFile(path), desiredWidth, desiredHeight, sourceWidth,
|
UriImageRequestDescriptor.java | 59 final int desiredHeight, final int sourceWidth, final int sourceHeight, 62 super(desiredWidth, desiredHeight, sourceWidth, sourceHeight, isStatic,
|
ImageRequest.java | 138 final boolean unknownSize = mDescriptor.sourceWidth == UNSPECIFIED_SIZE || 174 options.outWidth = mDescriptor.sourceWidth;
|
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/util/ |
BitmapUtilTests.java | 105 private byte[] createJpegRawData(int sourceWidth, int sourceHeight) throws IOException { 106 return createRawData(Bitmap.CompressFormat.JPEG, sourceWidth, sourceHeight); 109 private byte[] createPngRawData(int sourceWidth, int sourceHeight) throws IOException { 110 return createRawData(Bitmap.CompressFormat.PNG, sourceWidth, sourceHeight); 113 private byte[] createRawData(Bitmap.CompressFormat format, int sourceWidth, 116 Bitmap b = Bitmap.createBitmap(sourceWidth, sourceHeight, Bitmap.Config.ARGB_8888);
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
Utilities.java | 73 int sourceWidth = icon.getWidth(); 75 if (sourceWidth > textureWidth && sourceHeight > textureHeight) { 78 (sourceWidth - textureWidth) / 2, 81 } else if (sourceWidth == textureWidth && sourceHeight == textureHeight) { 115 int sourceWidth = icon.getIntrinsicWidth(); 117 if (sourceWidth > 0 && sourceHeight > 0) { 119 if (width < sourceWidth || height < sourceHeight) { 121 final float ratio = (float) sourceWidth / sourceHeight; 122 if (sourceWidth > sourceHeight) { 124 } else if (sourceHeight > sourceWidth) { [all...] |
/packages/apps/Messaging/src/com/android/messaging/datamodel/data/ |
GalleryGridItemData.java | 74 int sourceWidth = cursor.getInt(INDEX_WIDTH); 78 if (sourceWidth <= 0) { 79 sourceWidth = ImageRequest.UNSPECIFIED_SIZE; 92 sourceWidth, 115 mImageData.uri, mImageData.sourceWidth, mImageData.sourceHeight);
|
/frameworks/base/services/core/java/com/android/server/policy/ |
IconUtilities.java | 121 int sourceWidth = icon.getIntrinsicWidth(); 124 if (sourceWidth > 0 && sourceHeight > 0) { 126 if (width < sourceWidth || height < sourceHeight) { 128 final float ratio = (float) sourceWidth / sourceHeight; 129 if (sourceWidth > sourceHeight) { 131 } else if (sourceHeight > sourceWidth) { 134 } else if (sourceWidth < width && sourceHeight < height) { 136 width = sourceWidth;
|
/frameworks/base/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/ |
ImageUtils.java | 208 int sourceWidth = source.getWidth(); 210 int destWidth = Math.max(1, (int) (xScale * sourceWidth)); 227 g2.drawImage(source, 0, 0, destWidth, destHeight, 0, 0, sourceWidth, sourceHeight, 261 while (nearestWidth < sourceWidth / 2) { 271 g2.drawImage(source, 0, 0, nearestWidth, nearestHeight, 0, 0, sourceWidth, sourceHeight, 275 sourceWidth = nearestWidth; 280 int halfWidth = sourceWidth / 2; 285 g2.drawImage(source, 0, 0, halfWidth, halfHeight, 0, 0, sourceWidth, sourceHeight, 289 sourceWidth = halfWidth;
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
BitmapDrawableTest.java | 353 int sourceWidth, targetWidth; 359 sourceWidth = 200; 361 bitmap = Bitmap.createBitmap(sourceWidth, sourceHeight, Config.RGB_565); 368 sourceWidth, sourceDensity, targetDensity); 374 sourceWidth = 200; 376 bitmap = Bitmap.createBitmap(sourceWidth, sourceHeight, Config.RGB_565); 382 sourceWidth, sourceDensity, targetDensity); 388 sourceWidth = 48; 397 sourceWidth, sourceDensity, targetDensity);
|
NinePatchDrawableTest.java | 330 int sourceWidth = 80; 332 int[] colors = new int[sourceWidth * sourceHeight]; 334 colors, sourceWidth, sourceHeight, Bitmap.Config.RGB_565); 341 sourceWidth, sourceDensity, targetDensity); 357 assertTrue(sourceWidth != ninePatchDrawable.getIntrinsicWidth());
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ |
ImageUtils.java | [all...] |
/frameworks/av/cmds/screenrecord/ |
screenrecord.cpp | 222 uint32_t sourceWidth, sourceHeight; 224 sourceWidth = mainDpyInfo.w; 229 sourceWidth = mainDpyInfo.h; 231 Rect layerStackRect(sourceWidth, sourceHeight); 234 float displayAspect = (float) sourceHeight / (float) sourceWidth; [all...] |
/frameworks/native/opengl/tests/hwc/ |
hwcStress.cpp | 462 int sourceWidth = layer->sourceCrop.right 466 if (((layer->displayFrame.left + sourceWidth) <= width) 469 + sourceWidth;
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
Utilities.java | 256 int sourceWidth = icon.getIntrinsicWidth(); 258 if (sourceWidth > 0 && sourceHeight > 0) { 260 final float ratio = (float) sourceWidth / sourceHeight; 261 if (sourceWidth > sourceHeight) { 263 } else if (sourceHeight > sourceWidth) { [all...] |
/external/icu/icu4c/source/i18n/ |
measfmt.cpp | 329 UMeasureFormatWidth sourceWidth = widthFromKey(key); 330 if (sourceWidth == UMEASFMT_WIDTH_COUNT) { 345 cacheData.widthFallback[sourceWidth] = targetWidth; [all...] |
/frameworks/base/core/java/com/android/internal/widget/ |
ResolverDrawerLayout.java | 738 final int sourceWidth = MeasureSpec.getSize(widthMeasureSpec); 739 int widthSize = sourceWidth; 785 setMeasuredDimension(sourceWidth, heightSize); [all...] |
/packages/apps/Messaging/src/com/android/messaging/util/ |
ImageUtils.java | [all...] |
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
MeasureFormat.java | [all...] |