From 9167126a4cebbd4d30ffbbd5ed81a5a50e7241e2 Mon Sep 17 00:00:00 2001 From: Nader Jawad Date: Thu, 14 Feb 2019 13:33:22 -0800 Subject: Added additional documentation to Bitmap#getScaledWidth, Bitmap#getScaledHeight Added additional comments describing the logic behind bitmap dimension conversion between source and target densities Change-Id: I7a8f9fddadad337430319a826458d1811809cef6 Fixes: 115292074 Test: N/A --- graphics/java/android/graphics/Bitmap.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'graphics/java') diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index 18f0cae4733c..c46cbbee0228 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -1514,6 +1514,9 @@ public final class Bitmap implements Parcelable { * Convenience method that returns the width of this bitmap divided * by the density scale factor. * + * Returns the bitmap's width multiplied by the ratio of the target density to the bitmap's + * source density + * * @param targetDensity The density of the target canvas of the bitmap. * @return The scaled width of this bitmap, according to the density scale factor. */ @@ -1525,6 +1528,9 @@ public final class Bitmap implements Parcelable { * Convenience method that returns the height of this bitmap divided * by the density scale factor. * + * Returns the bitmap's height multiplied by the ratio of the target density to the bitmap's + * source density + * * @param targetDensity The density of the target canvas of the bitmap. * @return The scaled height of this bitmap, according to the density scale factor. */ -- cgit v1.2.3-59-g8ed1b