Lines Matching refs:height

108     Bitmap(long nativeBitmap, int width, int height, int density,
116 mHeight = height;
143 * width/height values
146 void reinit(int width, int height, boolean requestPremultiplied) {
148 mHeight = height;
198 * <p>Modifies the bitmap to have a specified width, height, and {@link
246 public void reconfigure(int width, int height, Config config) {
248 if (width <= 0 || height <= 0) {
249 throw new IllegalArgumentException("width and height must be > 0");
255 nativeReconfigure(mNativePtr, width, height, config.nativeInt, mRequestPremultiplied);
257 mHeight = height;
263 * with the current height and config.</p>
289 public void setHeight(int height) {
290 reconfigure(getWidth(), height, getConfig());
295 * with the current height and width.</p>
404 * Common code for checking that width and height are > 0
407 * @param height height to ensure is > 0
409 private static void checkWidthHeight(int width, int height) {
413 if (height <= 0) {
414 throw new IllegalArgumentException("height must be > 0");
687 * specified width and height are the same as the current width and height of
693 * @param dstHeight The new bitmap's desired height.
696 * @throws IllegalArgumentException if width is <= 0, or height is <= 0
703 final int height = src.getHeight();
704 if (width != dstWidth || height != dstHeight) {
706 final float sy = dstHeight / (float) height;
709 return Bitmap.createBitmap(src, 0, 0, width, height, m, filter);
731 * @param height The number of rows
733 * @throws IllegalArgumentException if the x, y, width, height values are
735 * or height is <= 0
737 public static Bitmap createBitmap(@NonNull Bitmap source, int x, int y, int width, int height) {
738 return createBitmap(source, x, y, width, height, null, false);
756 * @param height The number of rows
762 * @throws IllegalArgumentException if the x, y, width, height values are
764 * or height is <= 0
766 public static Bitmap createBitmap(@NonNull Bitmap source, int x, int y, int width, int height,
770 checkWidthHeight(width, height);
774 if (y + height > source.getHeight()) {
775 throw new IllegalArgumentException("y + height must be <= bitmap.height()");
780 height == source.getHeight() && (m == null || m.isIdentity())) {
791 int newh = height;
795 Rect srcR = new Rect(x, y, x + width, y + height);
796 RectF dstR = new RectF(0, 0, width, height);
831 newh = Math.round(deviceR.height());
868 * Returns a mutable bitmap with the specified width and height. Its
873 * @param height The height of the bitmap
875 * @throws IllegalArgumentException if the width or height are <= 0, or if
878 public static Bitmap createBitmap(int width, int height, @NonNull Config config) {
879 return createBitmap(width, height, config, true);
883 * Returns a mutable bitmap with the specified width and height. Its
891 * @param height The height of the bitmap
893 * @throws IllegalArgumentException if the width or height are <= 0, or if
897 int height, @NonNull Config config) {
898 return createBitmap(display, width, height, config, true);
902 * Returns a mutable bitmap with the specified width and height. Its
907 * @param height The height of the bitmap
913 * @throws IllegalArgumentException if the width or height are <= 0, or if
916 public static Bitmap createBitmap(int width, int height,
918 return createBitmap(null, width, height, config, hasAlpha);
922 * Returns a mutable bitmap with the specified width and height. Its
926 * @param height The height of the bitmap
936 * @throws IllegalArgumentException if the width or height are <= 0, if
943 public static Bitmap createBitmap(int width, int height, @NonNull Config config,
945 return createBitmap(null, width, height, config, hasAlpha, colorSpace);
949 * Returns a mutable bitmap with the specified width and height. Its
957 * @param height The height of the bitmap
963 * @throws IllegalArgumentException if the width or height are <= 0, or if
966 public static Bitmap createBitmap(@Nullable DisplayMetrics display, int width, int height,
968 return createBitmap(display, width, height, config, hasAlpha,
973 * Returns a mutable bitmap with the specified width and height. Its
981 * @param height The height of the bitmap
991 * @throws IllegalArgumentException if the width or height are <= 0, if
998 public static Bitmap createBitmap(@Nullable DisplayMetrics display, int width, int height,
1000 if (width <= 0 || height <= 0) {
1001 throw new IllegalArgumentException("width and height must be > 0");
1014 bm = nativeCreate(null, 0, width, width, height, config.nativeInt, true, null, null);
1027 bm = nativeCreate(null, 0, width, width, height, config.nativeInt, true,
1045 * Returns a immutable bitmap with the specified width and height, with each
1056 * @param height The height of the bitmap
1060 * @throws IllegalArgumentException if the width or height are <= 0, or if
1064 int width, int height, @NonNull Config config) {
1065 return createBitmap(null, colors, offset, stride, width, height, config);
1069 * Returns a immutable bitmap with the specified width and height, with each
1083 * @param height The height of the bitmap
1087 * @throws IllegalArgumentException if the width or height are <= 0, or if
1092 int width, int height, @NonNull Config config) {
1094 checkWidthHeight(width, height);
1098 int lastScanline = offset + (height - 1) * stride;
1104 if (width <= 0 || height <= 0) {
1105 throw new IllegalArgumentException("width and height must be > 0");
1107 Bitmap bm = nativeCreate(colors, offset, stride, width, height,
1116 * Returns a immutable bitmap with the specified width and height, with each
1122 * This array must be at least as large as width * height.
1124 * @param height The height of the bitmap
1128 * @throws IllegalArgumentException if the width or height are <= 0, or if
1132 int width, int height, Config config) {
1133 return createBitmap(null, colors, 0, width, width, height, config);
1137 * Returns a immutable bitmap with the specified width and height, with each
1146 * This array must be at least as large as width * height.
1148 * @param height The height of the bitmap
1152 * @throws IllegalArgumentException if the width or height are <= 0, or if
1156 @NonNull @ColorInt int colors[], int width, int height, @NonNull Config config) {
1157 return createBitmap(display, colors, 0, width, width, height, config);
1316 /** Returns the bitmap's height */
1368 * Convenience method that returns the height of this bitmap divided
1372 * @return The scaled height of this bitmap, according to the density scale factor.
1595 * if x or y are out of bounds (negative or >= to the width or height
1600 * @param y The y coordinate (0...height-1) of the pixel to return
1631 * @param height The number of rows to read
1633 * @throws IllegalArgumentException if x, y, width, height exceed the
1640 int x, int y, int width, int height) {
1644 if (width == 0 || height == 0) {
1647 checkPixelsAccess(x, y, width, height, offset, stride, pixels);
1649 x, y, width, height);
1665 throw new IllegalArgumentException("y must be < bitmap.height()");
1676 * @param height height of the area of pixels to access
1681 private void checkPixelsAccess(int x, int y, int width, int height,
1687 if (height < 0) {
1688 throw new IllegalArgumentException("height must be >= 0");
1694 if (y + height > getHeight()) {
1696 "y + height must be <= bitmap.height()");
1701 int lastScanline = offset + (height - 1) * stride;
1717 * @param y The y coordinate of the pixel to replace (0...height-1)
1748 * @param height The number of rows to write to the bitmap
1751 * @throws IllegalArgumentException if x, y, width, height are outside of
1757 int x, int y, int width, int height) {
1762 if (width == 0 || height == 0) {
1765 checkPixelsAccess(x, y, width, height, offset, stride, pixels);
1767 x, y, width, height);
1918 int stride, int width, int height,
1928 private static native void nativeReconfigure(long nativeBitmap, int width, int height,
1941 int width, int height);
1946 int width, int height);