Home
last modified time | relevance | path

Searched refs:sourceDensity (Results 1 – 10 of 10) sorted by relevance

/frameworks/base/graphics/java/android/graphics/drawable/
DInsetDrawable.java344 void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
345 super.onDensityChanged(sourceDensity, targetDensity); in onDensityChanged()
347 applyDensityScaling(sourceDensity, targetDensity); in onDensityChanged()
357 private void applyDensityScaling(int sourceDensity, int targetDensity) { in applyDensityScaling() argument
358 mInsetLeft.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
359 mInsetTop.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
360 mInsetRight.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
361 mInsetBottom.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
401 void scaleFromDensity(int sourceDensity, int targetDensity) { in scaleFromDensity() argument
403 mDimension = Bitmap.scaleFromDensity(mDimension, sourceDensity, targetDensity); in scaleFromDensity()
DNinePatchDrawable.java663 final int sourceDensity = ninePatch.getDensity(); in computeBitmapSize() local
669 sourceOpticalInsets.left, sourceDensity, targetDensity, true); in computeBitmapSize()
671 sourceOpticalInsets.top, sourceDensity, targetDensity, true); in computeBitmapSize()
673 sourceOpticalInsets.right, sourceDensity, targetDensity, true); in computeBitmapSize()
675 sourceOpticalInsets.bottom, sourceDensity, targetDensity, true); in computeBitmapSize()
687 sourcePadding.left, sourceDensity, targetDensity, false); in computeBitmapSize()
689 sourcePadding.top, sourceDensity, targetDensity, false); in computeBitmapSize()
691 sourcePadding.right, sourceDensity, targetDensity, false); in computeBitmapSize()
693 sourcePadding.bottom, sourceDensity, targetDensity, false); in computeBitmapSize()
699 ninePatch.getHeight(), sourceDensity, targetDensity, true); in computeBitmapSize()
[all …]
DGradientDrawable.java1897 final int sourceDensity = mDensity;
1900 applyDensityScaling(sourceDensity, targetDensity);
1904 private void applyDensityScaling(int sourceDensity, int targetDensity) {
1907 mInnerRadius, sourceDensity, targetDensity, true);
1911 mThickness, sourceDensity, targetDensity, true);
1915 mOpticalInsets.left, sourceDensity, targetDensity, true);
1917 mOpticalInsets.top, sourceDensity, targetDensity, true);
1919 mOpticalInsets.right, sourceDensity, targetDensity, true);
1921 mOpticalInsets.bottom, sourceDensity, targetDensity, true);
1926 mPadding.left, sourceDensity, targetDensity, false);
[all …]
DLayerDrawable.java1894 final int sourceDensity = mDensity;
1897 applyDensityScaling(sourceDensity, targetDensity);
1901 private void applyDensityScaling(int sourceDensity, int targetDensity) {
1902 mInsetL = Drawable.scaleFromDensity(mInsetL, sourceDensity, targetDensity, false);
1903 mInsetT = Drawable.scaleFromDensity(mInsetT, sourceDensity, targetDensity, false);
1904 mInsetR = Drawable.scaleFromDensity(mInsetR, sourceDensity, targetDensity, false);
1905 mInsetB = Drawable.scaleFromDensity(mInsetB, sourceDensity, targetDensity, false);
1907 mInsetS = Drawable.scaleFromDensity(mInsetS, sourceDensity, targetDensity, false);
1910 mInsetE = Drawable.scaleFromDensity(mInsetE, sourceDensity, targetDensity, false);
1913 mWidth = Drawable.scaleFromDensity(mWidth, sourceDensity, targetDensity, true);
[all …]
DVectorDrawable.java483 final int sourceDensity = mVectorState.mDensity; in computeVectorSize() local
485 if (targetDensity != sourceDensity) { in computeVectorSize()
486 mDpiScaledWidth = Drawable.scaleFromDensity(mVectorState.mBaseWidth, sourceDensity, in computeVectorSize()
488 mDpiScaledHeight = Drawable.scaleFromDensity(mVectorState.mBaseHeight,sourceDensity, in computeVectorSize()
491 opticalInsets.left, sourceDensity, targetDensity, false); in computeVectorSize()
493 opticalInsets.right, sourceDensity, targetDensity, false); in computeVectorSize()
495 opticalInsets.top, sourceDensity, targetDensity, false); in computeVectorSize()
497 opticalInsets.bottom, sourceDensity, targetDensity, false); in computeVectorSize()
998 final int sourceDensity = mDensity; in setDensity() local
1000 applyDensityScaling(sourceDensity, targetDensity); in setDensity()
[all …]
DDrawable.java1514 static float scaleFromDensity(float pixels, int sourceDensity, int targetDensity) { in scaleFromDensity() argument
1515 return pixels * targetDensity / sourceDensity; in scaleFromDensity()
1537 int pixels, int sourceDensity, int targetDensity, boolean isSize) { in scaleFromDensity() argument
1538 if (pixels == 0 || sourceDensity == targetDensity) { in scaleFromDensity()
1542 final float result = pixels * targetDensity / (float) sourceDensity; in scaleFromDensity()
DRippleDrawable.java1012 protected void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
1013 super.onDensityChanged(sourceDensity, targetDensity); in onDensityChanged()
1015 applyDensityScaling(sourceDensity, targetDensity); in onDensityChanged()
1018 private void applyDensityScaling(int sourceDensity, int targetDensity) { in applyDensityScaling() argument
1021 mMaxRadius, sourceDensity, targetDensity, true); in applyDensityScaling()
DDrawableWrapper.java498 final int sourceDensity = mDensity; in setDensity() local
501 onDensityChanged(sourceDensity, targetDensity); in setDensity()
514 void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
DBitmapDrawable.java559 final int sourceDensity = bitmap.getDensity(); in updateShaderMatrix() local
561 final boolean needScaling = sourceDensity != 0 && sourceDensity != targetDensity; in updateShaderMatrix()
573 final float densityScale = targetDensity / (float) sourceDensity; in updateShaderMatrix()
DDrawableContainer.java961 final int sourceDensity = mDensity; in updateDensity() local
964 if (sourceDensity != targetDensity) { in updateDensity()