diff options
author | Romain Guy <romainguy@google.com> | 2013-08-12 11:10:27 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2013-08-12 11:10:27 -0700 |
commit | 790552b240c05d58407f7c14acba656b2e85c523 (patch) | |
tree | b878263a391fa29323a3701e105d8e395fa08468 | |
parent | 719c44e03b97e850a46136ba336d729f5fbd1f47 (diff) | |
download | frameworks_base-790552b240c05d58407f7c14acba656b2e85c523.zip frameworks_base-790552b240c05d58407f7c14acba656b2e85c523.tar.gz frameworks_base-790552b240c05d58407f7c14acba656b2e85c523.tar.bz2 |
Update Bitmap.createBitmap() documentation
Change-Id: Ic2efed6cc03c8b2c2d9810b7ab645b0b98b91e1f
-rw-r--r-- | graphics/java/android/graphics/Bitmap.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index 55664fd..47cf875 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -559,6 +559,7 @@ public final class Bitmap implements Parcelable { * @param dstHeight The new bitmap's desired height. * @param filter true if the source should be filtered. * @return The new scaled bitmap or the source bitmap if no scaling is required. + * @throws IllegalArgumentException if width is <= 0, or height is <= 0 */ public static Bitmap createScaledBitmap(Bitmap src, int dstWidth, int dstHeight, boolean filter) { @@ -611,6 +612,9 @@ public final class Bitmap implements Parcelable { * @param width The number of pixels in each row * @param height The number of rows * @return A copy of a subset of the source bitmap or the source bitmap itself. + * @throws IllegalArgumentException if the x, y, width, height values are + * outside of the dimensions of the source bitmap, or width is <= 0, + * or height is <= 0 */ public static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height) { return createBitmap(source, x, y, width, height, null, false); @@ -637,7 +641,8 @@ public final class Bitmap implements Parcelable { * translation. * @return A bitmap that represents the specified subset of source * @throws IllegalArgumentException if the x, y, width, height values are - * outside of the dimensions of the source bitmap. + * outside of the dimensions of the source bitmap, or width is <= 0, + * or height is <= 0 */ public static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height, Matrix m, boolean filter) { |