Searched defs:targetDensity (Results 1 - 10 of 10) sorted by relevance

/frameworks/base/graphics/java/android/graphics/drawable/
H A DInsetDrawable.java344 void onDensityChanged(int sourceDensity, int targetDensity) { argument
345 super.onDensityChanged(sourceDensity, targetDensity);
347 applyDensityScaling(sourceDensity, targetDensity);
355 * @param targetDensity the new constant state density
357 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
358 mInsetLeft.scaleFromDensity(sourceDensity, targetDensity);
359 mInsetTop.scaleFromDensity(sourceDensity, targetDensity);
360 mInsetRight.scaleFromDensity(sourceDensity, targetDensity);
361 mInsetBottom.scaleFromDensity(sourceDensity, targetDensity);
401 void scaleFromDensity(int sourceDensity, int targetDensity) { argument
[all...]
H A DDrawableWrapper.java132 final int targetDensity = densityDpi == 0 ? DisplayMetrics.DENSITY_DEFAULT : densityDpi;
133 state.setDensity(targetDensity);
503 * @param targetDensity the new constant state density
505 public final void setDensity(int targetDensity) { argument
506 if (mDensity != targetDensity) {
508 mDensity = targetDensity;
510 onDensityChanged(sourceDensity, targetDensity);
521 * @param targetDensity the new constant state density
523 void onDensityChanged(int sourceDensity, int targetDensity) { argument
H A DAdaptiveIconDrawable.java925 public final void setDensity(int targetDensity) { argument
926 if (mDensity != targetDensity) {
927 mDensity = targetDensity;
987 public final void setDensity(int targetDensity) { argument
988 if (mDensity != targetDensity) {
989 mDensity = targetDensity;
H A DDrawable.java1547 * @param targetDensity the target density
1550 static float scaleFromDensity(float pixels, int sourceDensity, int targetDensity) { argument
1551 return pixels * targetDensity / sourceDensity;
1567 * @param targetDensity the target density
1573 int pixels, int sourceDensity, int targetDensity, boolean isSize) {
1574 if (pixels == 0 || sourceDensity == targetDensity) {
1578 final float result = pixels * targetDensity / (float) sourceDensity;
1572 scaleFromDensity( int pixels, int sourceDensity, int targetDensity, boolean isSize) argument
H A DRippleDrawable.java994 protected void onDensityChanged(int sourceDensity, int targetDensity) { argument
995 super.onDensityChanged(sourceDensity, targetDensity);
997 applyDensityScaling(sourceDensity, targetDensity);
1000 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
1003 mMaxRadius, sourceDensity, targetDensity, true);
H A DGradientDrawable.java1912 * @param targetDensity the new constant state density
1914 public final void setDensity(int targetDensity) { argument
1915 if (mDensity != targetDensity) {
1917 mDensity = targetDensity;
1919 applyDensityScaling(sourceDensity, targetDensity);
1923 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
1926 mInnerRadius, sourceDensity, targetDensity, true);
1930 mThickness, sourceDensity, targetDensity, true);
1934 mOpticalInsets.left, sourceDensity, targetDensity, true);
1936 mOpticalInsets.top, sourceDensity, targetDensity, tru
[all...]
H A DLayerDrawable.java1892 public final void setDensity(int targetDensity) { argument
1893 if (mDensity != targetDensity) {
1895 mDensity = targetDensity;
1897 applyDensityScaling(sourceDensity, targetDensity);
1901 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
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, fals
1994 setDensity(int targetDensity) argument
2003 onDensityChanged(int sourceDensity, int targetDensity) argument
2007 applyDensityScaling(int sourceDensity, int targetDensity) argument
[all...]
H A DVectorDrawable.java563 final int targetDensity = mTargetDensity;
564 if (targetDensity != sourceDensity) {
566 targetDensity, true);
568 targetDensity, true);
570 opticalInsets.left, sourceDensity, targetDensity, false);
572 opticalInsets.right, sourceDensity, targetDensity, false);
574 opticalInsets.top, sourceDensity, targetDensity, false);
576 opticalInsets.bottom, sourceDensity, targetDensity, false);
1088 public final boolean setDensity(int targetDensity) { argument
1089 if (mDensity != targetDensity) {
1098 applyDensityScaling(int sourceDensity, int targetDensity) argument
[all...]
/frameworks/base/core/jni/android/graphics/
H A DBitmapFactory.cpp225 const int targetDensity = env->GetIntField(options, gOptions_targetDensityFieldID); local
227 if (density != 0 && targetDensity != 0 && density != screenDensity) {
228 scale = (float) targetDensity / density;
/frameworks/base/graphics/java/android/graphics/
H A DBitmap.java1476 * @param targetDensity The density of the target canvas of the bitmap.
1479 public int getScaledWidth(int targetDensity) { argument
1480 return scaleFromDensity(getWidth(), mDensity, targetDensity);
1487 * @param targetDensity The density of the target canvas of the bitmap.
1490 public int getScaledHeight(int targetDensity) { argument
1491 return scaleFromDensity(getHeight(), mDensity, targetDensity);

Completed in 97 milliseconds