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.java345 void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
346 super.onDensityChanged(sourceDensity, targetDensity); in onDensityChanged()
348 applyDensityScaling(sourceDensity, targetDensity); in onDensityChanged()
358 private void applyDensityScaling(int sourceDensity, int targetDensity) { in applyDensityScaling() argument
359 mInsetLeft.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
360 mInsetTop.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
361 mInsetRight.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
362 mInsetBottom.scaleFromDensity(sourceDensity, targetDensity); in applyDensityScaling()
402 void scaleFromDensity(int sourceDensity, int targetDensity) { in scaleFromDensity() argument
404 mDimension = Bitmap.scaleFromDensity(mDimension, sourceDensity, targetDensity); in scaleFromDensity()
DNinePatchDrawable.java673 final int sourceDensity = ninePatch.getDensity() == Bitmap.DENSITY_NONE ? in computeBitmapSize() local
679 sourceOpticalInsets.left, sourceDensity, targetDensity, true); in computeBitmapSize()
681 sourceOpticalInsets.top, sourceDensity, targetDensity, true); in computeBitmapSize()
683 sourceOpticalInsets.right, sourceDensity, targetDensity, true); in computeBitmapSize()
685 sourceOpticalInsets.bottom, sourceDensity, targetDensity, true); in computeBitmapSize()
697 sourcePadding.left, sourceDensity, targetDensity, true); in computeBitmapSize()
699 sourcePadding.top, sourceDensity, targetDensity, true); in computeBitmapSize()
701 sourcePadding.right, sourceDensity, targetDensity, true); in computeBitmapSize()
703 sourcePadding.bottom, sourceDensity, targetDensity, true); in computeBitmapSize()
709 ninePatch.getHeight(), sourceDensity, targetDensity, true); in computeBitmapSize()
[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 …]
DGradientDrawable.java2108 final int sourceDensity = mDensity;
2111 applyDensityScaling(sourceDensity, targetDensity);
2119 private void applyDensityScaling(int sourceDensity, int targetDensity) {
2122 mInnerRadius, sourceDensity, targetDensity, true);
2126 mThickness, sourceDensity, targetDensity, true);
2130 mOpticalInsets.left, sourceDensity, targetDensity, true);
2132 mOpticalInsets.top, sourceDensity, targetDensity, true);
2134 mOpticalInsets.right, sourceDensity, targetDensity, true);
2136 mOpticalInsets.bottom, sourceDensity, targetDensity, true);
2141 mPadding.left, sourceDensity, targetDensity, false);
[all …]
DVectorDrawable.java579 final int sourceDensity = mVectorState.mDensity; in computeVectorSize() local
581 if (targetDensity != sourceDensity) { in computeVectorSize()
582 mDpiScaledWidth = Drawable.scaleFromDensity(mVectorState.mBaseWidth, sourceDensity, in computeVectorSize()
584 mDpiScaledHeight = Drawable.scaleFromDensity(mVectorState.mBaseHeight,sourceDensity, in computeVectorSize()
587 opticalInsets.left, sourceDensity, targetDensity, false); in computeVectorSize()
589 opticalInsets.right, sourceDensity, targetDensity, false); in computeVectorSize()
591 opticalInsets.top, sourceDensity, targetDensity, false); in computeVectorSize()
593 opticalInsets.bottom, sourceDensity, targetDensity, false); in computeVectorSize()
1108 final int sourceDensity = mDensity; in setDensity() local
1110 applyDensityScaling(sourceDensity, targetDensity); in setDensity()
[all …]
DRippleDrawable.java1003 protected void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
1004 super.onDensityChanged(sourceDensity, targetDensity); in onDensityChanged()
1006 applyDensityScaling(sourceDensity, targetDensity); in onDensityChanged()
1009 private void applyDensityScaling(int sourceDensity, int targetDensity) { in applyDensityScaling() argument
1012 mMaxRadius, sourceDensity, targetDensity, true); in applyDensityScaling()
DDrawable.java1635 static float scaleFromDensity(float pixels, int sourceDensity, int targetDensity) { in scaleFromDensity() argument
1636 return pixels * targetDensity / sourceDensity; in scaleFromDensity()
1658 int pixels, int sourceDensity, int targetDensity, boolean isSize) { in scaleFromDensity() argument
1659 if (pixels == 0 || sourceDensity == targetDensity) { in scaleFromDensity()
1663 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.java578 final int sourceDensity = bitmap.getDensity(); in updateShaderMatrix() local
580 final boolean needScaling = sourceDensity != 0 && sourceDensity != targetDensity; in updateShaderMatrix()
592 final float densityScale = targetDensity / (float) sourceDensity; in updateShaderMatrix()
DDrawableContainer.java966 final int sourceDensity = mDensity; in updateDensity() local
969 if (sourceDensity != targetDensity) { in updateDensity()