/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;
58 temp.y = sourceHeight * scale;
63 float sourceRatio = sourceHeight / sourceWidth;
64 float scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;
66 temp.y = sourceHeight * scale;
72 temp.y = sourceHeight * scale;
76 float scale = targetHeight / sourceHeight;
78 temp.y = sourceHeight * scale; [all...] |
/packages/apps/Messaging/src/com/android/messaging/ui/ |
PlaceholderInsetDrawable.java | 44 final int sourceWidth, final int sourceHeight) { 49 final int insetVertical = drawableHeight < 0 || drawableHeight > sourceHeight ? 50 0 : (sourceHeight - drawableHeight) / 2; 52 insetHorizontal, insetVertical, sourceWidth, sourceHeight); 57 final int sourceWidth, final int sourceHeight) { 60 mSourceHeight = sourceHeight;
|
AsyncImageView.java | 165 descriptor.sourceHeight != ImageRequest.UNSPECIFIED_SIZE) { 171 descriptor.sourceWidth, descriptor.sourceHeight));
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/tools/ |
IconFactory.java | 48 int sourceHeight = sourceImage.getHeight(); 50 if (sourceWidth == 0 || sourceHeight == 0 || iconWidth == 0 || iconHeight == 0) { 75 int sourceHeight = sourceImage.getHeight(); 79 if (sourceWidth == 0 || sourceHeight == 0 || iconWidth == 0 || iconHeight == 0) { 89 srcRect = new Rect(0, 0, sourceWidth, sourceHeight); 93 float hScale = sourceHeight / (float) iconHeight; 100 float borderH = (sourceHeight - ih) / 2.0f;
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/ |
ImageRequestDescriptor.java | 36 public final int sourceHeight; 77 final int desiredHeight, final int sourceWidth, final int sourceHeight, 83 Assert.isTrue(sourceHeight == ImageRequest.UNSPECIFIED_SIZE || sourceHeight > 0); 87 this.sourceHeight = sourceHeight; 111 public void updateSourceDimensions(final int sourceWidth, final int sourceHeight) {
|
VideoThumbnailRequestDescriptor.java | 26 int desiredHeight, int sourceWidth, int sourceHeight) { 28 sourceHeight, false /* canCompress */, false /* isStatic */,
|
MessagePartImageRequestDescriptor.java | 44 final int sourceHeight, boolean isStatic) { 45 super(contentUri, desiredWidth, desiredHeight, sourceWidth, sourceHeight, 60 updatedWidth != sourceWidth && updatedHeight != sourceHeight) {
|
FileImageRequestDescriptor.java | 47 final int desiredHeight, final int sourceWidth, final int sourceHeight, 50 sourceHeight, canCompress, isStatic, false /* cropToCircle */,
|
UriImageRequestDescriptor.java | 59 final int desiredHeight, final int sourceWidth, final int sourceHeight, 62 super(desiredWidth, desiredHeight, sourceWidth, sourceHeight, isStatic,
|
ImageRequest.java | 139 mDescriptor.sourceHeight == UNSPECIFIED_SIZE; 175 options.outHeight = mDescriptor.sourceHeight;
|
/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); 114 int sourceHeight) throws IOException { 116 Bitmap b = Bitmap.createBitmap(sourceWidth, sourceHeight, Bitmap.Config.ARGB_8888);
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
Utilities.java | 74 int sourceHeight = icon.getHeight(); 75 if (sourceWidth > textureWidth && sourceHeight > textureHeight) { 79 (sourceHeight - textureHeight) / 2, 81 } else if (sourceWidth == textureWidth && sourceHeight == textureHeight) { 116 int sourceHeight = icon.getIntrinsicHeight(); 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 | 75 int sourceHeight = cursor.getInt(INDEX_HEIGHT); 81 if (sourceHeight <= 0) { 82 sourceHeight = ImageRequest.UNSPECIFIED_SIZE; 93 sourceHeight, 115 mImageData.uri, mImageData.sourceWidth, mImageData.sourceHeight);
|
/frameworks/base/services/core/java/com/android/server/policy/ |
IconUtilities.java | 122 int sourceHeight = icon.getIntrinsicHeight(); 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) { 137 height = sourceHeight;
|
/frameworks/base/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/ |
ImageUtils.java | 209 int sourceHeight = source.getHeight(); 211 int destHeight = Math.max(1, (int) (yScale * sourceHeight)); 227 g2.drawImage(source, 0, 0, destWidth, destHeight, 0, 0, sourceWidth, sourceHeight, 271 g2.drawImage(source, 0, 0, nearestWidth, nearestHeight, 0, 0, sourceWidth, sourceHeight, 276 sourceHeight = nearestHeight; 281 int halfHeight = sourceHeight / 2; 285 g2.drawImage(source, 0, 0, halfWidth, halfHeight, 0, 0, sourceWidth, sourceHeight, 290 sourceHeight = halfHeight;
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
BitmapDrawableTest.java | 354 int sourceHeight, targetHeight; 360 sourceHeight = 300; 361 bitmap = Bitmap.createBitmap(sourceWidth, sourceHeight, Config.RGB_565); 370 sourceHeight, sourceDensity, targetDensity); 375 sourceHeight = 300; 376 bitmap = Bitmap.createBitmap(sourceWidth, sourceHeight, Config.RGB_565); 384 sourceHeight, sourceDensity, targetDensity); 389 sourceHeight = 48; 399 sourceHeight, sourceDensity, targetDensity);
|
NinePatchDrawableTest.java | 331 int sourceHeight = 120; 332 int[] colors = new int[sourceWidth * sourceHeight]; 334 colors, sourceWidth, sourceHeight, Bitmap.Config.RGB_565); 343 sourceHeight, sourceDensity, targetDensity); 356 assertTrue(sourceHeight != ninePatchDrawable.getIntrinsicHeight());
|
/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; 225 sourceHeight = mainDpyInfo.h; 228 sourceHeight = mainDpyInfo.w; 231 Rect layerStackRect(sourceWidth, sourceHeight); 234 float displayAspect = (float) sourceHeight / (float) sourceWidth; [all...] |
/frameworks/native/opengl/tests/hwc/ |
hwcStress.cpp | 464 int sourceHeight = layer->sourceCrop.bottom 467 && ((layer->displayFrame.top + sourceHeight) <= height)) { 471 + sourceHeight;
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
Utilities.java | 257 int sourceHeight = icon.getIntrinsicHeight(); 258 if (sourceWidth > 0 && sourceHeight > 0) { 260 final float ratio = (float) sourceWidth / sourceHeight; 261 if (sourceWidth > sourceHeight) { 263 } else if (sourceHeight > sourceWidth) { [all...] |
/packages/apps/Messaging/src/com/android/messaging/util/ |
ImageUtils.java | [all...] |
/frameworks/base/services/core/java/com/android/server/wm/ |
AppTransition.java | [all...] |
/hardware/qcom/display/msm8084/libhwcomposer/ |
hwc.cpp | 252 uint32_t sourceHeight = sourceCrop.bottom - sourceCrop.top; 255 isEqual(((float)layerHeight / (float)sourceHeight), yresRatio))
|
/external/deqp/modules/gles3/functional/ |
es3fFramebufferBlitTests.cpp | 767 const int sourceHeight = (m_blitDir == BLIT_DEFAULT_TO_TARGET) ? (getHeight()) : (fboTexH); 769 const int gridRenderHeight= de::min(256, sourceHeight); [all...] |