diff options
author | 2019-02-14 13:33:22 -0800 | |
---|---|---|
committer | 2019-02-14 13:38:27 -0800 | |
commit | 9167126a4cebbd4d30ffbbd5ed81a5a50e7241e2 (patch) | |
tree | b1ef5f6f088a61339020bc7357b95e82b6dae07c /graphics/java | |
parent | aa602f16fcfa7bef9d564d2c7aeb19a050e23bb5 (diff) |
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
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/Bitmap.java | 6 |
1 files changed, 6 insertions, 0 deletions
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. */ |