Searched refs:targetDensity (Results 1 - 16 of 16) sorted by relevance

/frameworks/layoutlib/bridge/src/android/graphics/
H A DBitmapFactory_Delegate.java144 final int targetDensity = opts.inTargetDensity;
145 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) {
155 outputBitmap.setDensity(targetDensity);
/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 DNinePatchDrawable.java670 final int targetDensity = mTargetDensity;
672 targetDensity : ninePatch.getDensity();
677 sourceOpticalInsets.left, sourceDensity, targetDensity, true);
679 sourceOpticalInsets.top, sourceDensity, targetDensity, true);
681 sourceOpticalInsets.right, sourceDensity, targetDensity, true);
683 sourceOpticalInsets.bottom, sourceDensity, targetDensity, true);
695 sourcePadding.left, sourceDensity, targetDensity, true);
697 sourcePadding.top, sourceDensity, targetDensity, true);
699 sourcePadding.right, sourceDensity, targetDensity, true);
701 sourcePadding.bottom, sourceDensity, targetDensity, tru
[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 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...]
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 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 DBitmapDrawable.java576 final int targetDensity = mTargetDensity;
577 final boolean needScaling = sourceDensity != 0 && sourceDensity != targetDensity;
589 final float densityScale = targetDensity / (float) sourceDensity;
H A DDrawableContainer.java960 final int targetDensity = Drawable.resolveDensity(res, mDensity);
962 mDensity = targetDensity;
964 if (sourceDensity != targetDensity) {
/frameworks/base/graphics/java/android/graphics/
H A DBitmapFactory.java669 final int targetDensity = opts.inTargetDensity;
670 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) {
677 outputBitmap.setDensity(targetDensity);
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);
/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/services/core/java/com/android/server/wm/
H A DWindowManagerService.java3328 final int targetDensity = forcedDensity != 0 ? forcedDensity
3330 setForcedDisplayDensityLocked(displayContent, targetDensity);

Completed in 242 milliseconds