Home
last modified time | relevance | path

Searched refs:targetDensity (Results 1 – 3 of 3) sorted by relevance

/frameworks/base/graphics/java/android/graphics/
DBitmapFactory.java491 int targetDensity = 0; in decodeStream() local
494 targetDensity = opts.inTargetDensity; in decodeStream()
495 if (density != 0 && targetDensity != 0) { in decodeStream()
496 scale = targetDensity / (float) density; in decodeStream()
501 if (bm != null && targetDensity != 0) bm.setDensity(targetDensity); in decodeStream()
518 int targetDensity = 0; in decodeStream() local
521 targetDensity = opts.inTargetDensity; in decodeStream()
522 if (density != 0 && targetDensity != 0) { in decodeStream()
523 scale = targetDensity / (float) density; in decodeStream()
528 if (bm != null && targetDensity != 0) bm.setDensity(targetDensity); in decodeStream()
[all …]
DBitmap.java832 public int getScaledWidth(int targetDensity) { in getScaledWidth() argument
833 return scaleFromDensity(getWidth(), mDensity, targetDensity); in getScaledWidth()
843 public int getScaledHeight(int targetDensity) { in getScaledHeight() argument
844 return scaleFromDensity(getHeight(), mDensity, targetDensity); in getScaledHeight()
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DBitmapFactory_Delegate.java58 final int targetDensity = opts.inTargetDensity; in finishDecode() local
59 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in finishDecode()
67 float scale = targetDensity / (float)density; in finishDecode()
78 bm.setDensity(targetDensity); in finishDecode()