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);
494 * @param targetDensity the new constant state density
496 public final void setDensity(int targetDensity) { argument
497 if (mDensity != targetDensity) {
499 mDensity = targetDensity;
501 onDensityChanged(sourceDensity, targetDensity);
512 * @param targetDensity the new constant state density
514 void onDensityChanged(int sourceDensity, int targetDensity) { argument
H A DAdaptiveIconDrawable.java927 public final void setDensity(int targetDensity) { argument
928 if (mDensity != targetDensity) {
929 mDensity = targetDensity;
989 public final void setDensity(int targetDensity) { argument
990 if (mDensity != targetDensity) {
991 mDensity = targetDensity;
H A DDrawable.java1511 * @param targetDensity the target density
1514 static float scaleFromDensity(float pixels, int sourceDensity, int targetDensity) { argument
1515 return pixels * targetDensity / sourceDensity;
1531 * @param targetDensity the target density
1537 int pixels, int sourceDensity, int targetDensity, boolean isSize) {
1538 if (pixels == 0 || sourceDensity == targetDensity) {
1542 final float result = pixels * targetDensity / (float) sourceDensity;
1536 scaleFromDensity( int pixels, int sourceDensity, int targetDensity, boolean isSize) argument
H A DRippleDrawable.java1012 protected void onDensityChanged(int sourceDensity, int targetDensity) { argument
1013 super.onDensityChanged(sourceDensity, targetDensity);
1015 applyDensityScaling(sourceDensity, targetDensity);
1018 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
1021 mMaxRadius, sourceDensity, targetDensity, true);
H A DGradientDrawable.java1893 * @param targetDensity the new constant state density
1895 public final void setDensity(int targetDensity) { argument
1896 if (mDensity != targetDensity) {
1898 mDensity = targetDensity;
1900 applyDensityScaling(sourceDensity, targetDensity);
1904 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
1907 mInnerRadius, sourceDensity, targetDensity, true);
1911 mThickness, sourceDensity, targetDensity, true);
1915 mOpticalInsets.left, sourceDensity, targetDensity, true);
1917 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.java484 final int targetDensity = mTargetDensity;
485 if (targetDensity != sourceDensity) {
487 targetDensity, true);
489 targetDensity, true);
491 opticalInsets.left, sourceDensity, targetDensity, false);
493 opticalInsets.right, sourceDensity, targetDensity, false);
495 opticalInsets.top, sourceDensity, targetDensity, false);
497 opticalInsets.bottom, sourceDensity, targetDensity, false);
996 public final boolean setDensity(int targetDensity) { argument
997 if (mDensity != targetDensity) {
1006 applyDensityScaling(int sourceDensity, int targetDensity) argument
[all...]
/frameworks/base/core/jni/android/graphics/
H A DBitmapFactory.cpp282 const int targetDensity = env->GetIntField(options, gOptions_targetDensityFieldID); local
284 if (density != 0 && targetDensity != 0 && density != screenDensity) {
285 scale = (float) targetDensity / density;
/frameworks/base/graphics/java/android/graphics/
H A DBitmap.java1360 * @param targetDensity The density of the target canvas of the bitmap.
1363 public int getScaledWidth(int targetDensity) { argument
1364 return scaleFromDensity(getWidth(), mDensity, targetDensity);
1371 * @param targetDensity The density of the target canvas of the bitmap.
1374 public int getScaledHeight(int targetDensity) { argument
1375 return scaleFromDensity(getHeight(), mDensity, targetDensity);

Completed in 521 milliseconds