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.java346 void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
347 super.onDensityChanged(sourceDensity, targetDensity); in onDensityChanged()
349 applyDensityScaling(sourceDensity, targetDensity); in onDensityChanged()
359 private void applyDensityScaling(int sourceDensity, int targetDensity) { in applyDensityScaling() argument
360 mInsetLeft.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
361 mInsetTop.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
362 mInsetRight.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
363 mInsetBottom.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
403 void scaleFromDensity(int sourceDensity, int targetDensity) { in scaleFromDensity() argument
405 mDimension = Bitmap.scaleFromDensity(mDimension, sourceDensity, targetDensity); in scaleFromDensity()
DNinePatchDrawable.java672 final int sourceDensity = ninePatch.getDensity() == Bitmap.DENSITY_NONE ? in computeBitmapSize() local
678 sourceOpticalInsets.left, sourceDensity, targetDensity, true); in computeBitmapSize()
680 sourceOpticalInsets.top, sourceDensity, targetDensity, true); in computeBitmapSize()
682 sourceOpticalInsets.right, sourceDensity, targetDensity, true); in computeBitmapSize()
684 sourceOpticalInsets.bottom, sourceDensity, targetDensity, true); in computeBitmapSize()
696 sourcePadding.left, sourceDensity, targetDensity, true); in computeBitmapSize()
698 sourcePadding.top, sourceDensity, targetDensity, true); in computeBitmapSize()
700 sourcePadding.right, sourceDensity, targetDensity, true); in computeBitmapSize()
702 sourcePadding.bottom, sourceDensity, targetDensity, true); in computeBitmapSize()
708 ninePatch.getHeight(), sourceDensity, targetDensity, true); in computeBitmapSize()
[all …]
DGradientDrawable.java2111 final int sourceDensity = mDensity;
2114 applyDensityScaling(sourceDensity, targetDensity);
2122 private void applyDensityScaling(int sourceDensity, int targetDensity) {
2125 mInnerRadius, sourceDensity, targetDensity, true);
2129 mThickness, sourceDensity, targetDensity, true);
2133 mOpticalInsets.left, sourceDensity, targetDensity, true);
2135 mOpticalInsets.top, sourceDensity, targetDensity, true);
2137 mOpticalInsets.right, sourceDensity, targetDensity, true);
2139 mOpticalInsets.bottom, sourceDensity, targetDensity, true);
2144 mPadding.left, sourceDensity, targetDensity, false);
[all …]
DLayerDrawable.java1903 final int sourceDensity = mDensity;
1906 applyDensityScaling(sourceDensity, targetDensity);
1910 private void applyDensityScaling(int sourceDensity, int targetDensity) {
1911 mInsetL = Drawable.scaleFromDensity(mInsetL, sourceDensity, targetDensity, false);
1912 mInsetT = Drawable.scaleFromDensity(mInsetT, sourceDensity, targetDensity, false);
1913 mInsetR = Drawable.scaleFromDensity(mInsetR, sourceDensity, targetDensity, false);
1914 mInsetB = Drawable.scaleFromDensity(mInsetB, sourceDensity, targetDensity, false);
1916 mInsetS = Drawable.scaleFromDensity(mInsetS, sourceDensity, targetDensity, false);
1919 mInsetE = Drawable.scaleFromDensity(mInsetE, sourceDensity, targetDensity, false);
1922 mWidth = Drawable.scaleFromDensity(mWidth, sourceDensity, targetDensity, true);
[all …]
DVectorDrawable.java583 final int sourceDensity = mVectorState.mDensity; in computeVectorSize() local
585 if (targetDensity != sourceDensity) { in computeVectorSize()
586 mDpiScaledWidth = Drawable.scaleFromDensity(mVectorState.mBaseWidth, sourceDensity, in computeVectorSize()
588 mDpiScaledHeight = Drawable.scaleFromDensity(mVectorState.mBaseHeight,sourceDensity, in computeVectorSize()
591 opticalInsets.left, sourceDensity, targetDensity, false); in computeVectorSize()
593 opticalInsets.right, sourceDensity, targetDensity, false); in computeVectorSize()
595 opticalInsets.top, sourceDensity, targetDensity, false); in computeVectorSize()
597 opticalInsets.bottom, sourceDensity, targetDensity, false); in computeVectorSize()
1112 final int sourceDensity = mDensity; in setDensity() local
1114 applyDensityScaling(sourceDensity, targetDensity); in setDensity()
[all …]
DDrawable.java1632 static float scaleFromDensity(float pixels, int sourceDensity, int targetDensity) { in scaleFromDensity() argument
1633 return pixels * targetDensity / sourceDensity; in scaleFromDensity()
1655 int pixels, int sourceDensity, int targetDensity, boolean isSize) { in scaleFromDensity() argument
1656 if (pixels == 0 || sourceDensity == targetDensity) { in scaleFromDensity()
1660 final float result = pixels * targetDensity / (float) sourceDensity; in scaleFromDensity()
DDrawableWrapper.java526 final int sourceDensity = mDensity; in setDensity() local
529 onDensityChanged(sourceDensity, targetDensity); in setDensity()
542 void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
DBitmapDrawable.java579 final int sourceDensity = bitmap.getDensity(); in updateShaderMatrix() local
581 final boolean needScaling = sourceDensity != 0 && sourceDensity != targetDensity; in updateShaderMatrix()
593 final float densityScale = targetDensity / (float) sourceDensity; in updateShaderMatrix()
DRippleDrawable.java1342 protected void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
1343 super.onDensityChanged(sourceDensity, targetDensity); in onDensityChanged()
1345 applyDensityScaling(sourceDensity, targetDensity); in onDensityChanged()
1348 private void applyDensityScaling(int sourceDensity, int targetDensity) { in applyDensityScaling() argument
1351 mMaxRadius, sourceDensity, targetDensity, true); in applyDensityScaling()
DDrawableContainer.java965 final int sourceDensity = mDensity; in updateDensity() local
968 if (sourceDensity != targetDensity) { in updateDensity()