Lines Matching refs:width
128 Bitmap(long nativeBitmap, int width, int height, int density, in Bitmap() argument
131 this(nativeBitmap, width, height, density, requestPremultiplied, ninePatchChunk, in Bitmap()
136 Bitmap(long nativeBitmap, int width, int height, int density, in Bitmap() argument
143 mWidth = width; in Bitmap()
184 void reinit(int width, int height, boolean requestPremultiplied) { in reinit() argument
185 mWidth = width; in reinit()
284 public void reconfigure(int width, int height, @NonNull Config config) { in reconfigure() argument
286 if (width <= 0 || height <= 0) { in reconfigure()
293 nativeReconfigure(mNativePtr, width, height, config.nativeInt, mRequestPremultiplied); in reconfigure()
294 mWidth = width; in reconfigure()
311 public void setWidth(int width) { in setWidth() argument
312 reconfigure(width, getHeight(), getConfig()); in setWidth()
443 private static void checkWidthHeight(int width, int height) { in checkWidthHeight() argument
444 if (width <= 0) { in checkWidthHeight()
824 final int width = src.getWidth(); in createScaledBitmap() local
826 if (width != dstWidth || height != dstHeight) { in createScaledBitmap()
827 final float sx = dstWidth / (float) width; in createScaledBitmap()
831 return Bitmap.createBitmap(src, 0, 0, width, height, m, filter); in createScaledBitmap()
861 public static Bitmap createBitmap(@NonNull Bitmap source, int x, int y, int width, int height) { in createBitmap() argument
862 return createBitmap(source, x, y, width, height, null, false); in createBitmap()
897 public static Bitmap createBitmap(@NonNull Bitmap source, int x, int y, int width, int height, in createBitmap() argument
901 checkWidthHeight(width, height); in createBitmap()
902 if (x + width > source.getWidth()) { in createBitmap()
913 if (!source.isMutable() && x == 0 && y == 0 && width == source.getWidth() && in createBitmap()
924 int neww = width; in createBitmap()
929 Rect srcR = new Rect(x, y, x + width, y + height); in createBitmap()
930 RectF dstR = new RectF(0, 0, width, height); in createBitmap()
966 neww = Math.round(deviceR.width()); in createBitmap()
1069 public static Bitmap createBitmap(int width, int height, @NonNull Config config) { in createBitmap() argument
1070 return createBitmap(width, height, config, true); in createBitmap()
1088 public static Bitmap createBitmap(@Nullable DisplayMetrics display, int width, in createBitmap() argument
1090 return createBitmap(display, width, height, config, true); in createBitmap()
1109 public static Bitmap createBitmap(int width, int height, in createBitmap() argument
1111 return createBitmap(null, width, height, config, hasAlpha); in createBitmap()
1137 public static Bitmap createBitmap(int width, int height, @NonNull Config config, in createBitmap() argument
1139 return createBitmap(null, width, height, config, hasAlpha, colorSpace); in createBitmap()
1161 public static Bitmap createBitmap(@Nullable DisplayMetrics display, int width, int height, in createBitmap() argument
1163 return createBitmap(display, width, height, config, hasAlpha, in createBitmap()
1194 public static Bitmap createBitmap(@Nullable DisplayMetrics display, int width, int height, in createBitmap() argument
1196 if (width <= 0 || height <= 0) { in createBitmap()
1206 Bitmap bm = nativeCreate(null, 0, width, width, height, config.nativeInt, true, in createBitmap()
1243 int width, int height, @NonNull Config config) { in createBitmap() argument
1244 return createBitmap(null, colors, offset, stride, width, height, config); in createBitmap()
1272 int width, int height, @NonNull Config config) { in createBitmap() argument
1274 checkWidthHeight(width, height); in createBitmap()
1275 if (Math.abs(stride) < width) { in createBitmap()
1280 if (offset < 0 || (offset + width > length) || lastScanline < 0 || in createBitmap()
1281 (lastScanline + width > length)) { in createBitmap()
1284 if (width <= 0 || height <= 0) { in createBitmap()
1288 Bitmap bm = nativeCreate(colors, offset, stride, width, height, in createBitmap()
1314 int width, int height, Config config) { in createBitmap() argument
1315 return createBitmap(null, colors, 0, width, width, height, config); in createBitmap()
1339 @NonNull @ColorInt int colors[], int width, int height, @NonNull Config config) { in createBitmap() argument
1340 return createBitmap(display, colors, 0, width, width, height, config); in createBitmap()
1378 public static Bitmap createBitmap(@NonNull Picture source, int width, int height, in createBitmap() argument
1380 if (width <= 0 || height <= 0) { in createBitmap()
1392 node.setLeftTopRightBottom(0, 0, width, height); in createBitmap()
1395 final RecordingCanvas canvas = node.beginRecording(width, height); in createBitmap()
1396 if (source.getWidth() != width || source.getHeight() != height) { in createBitmap()
1397 canvas.scale(width / (float) source.getWidth(), in createBitmap()
1402 Bitmap bitmap = ThreadedRenderer.createHardwareBitmap(node, width, height); in createBitmap()
1408 Bitmap bitmap = Bitmap.createBitmap(width, height, config); in createBitmap()
1410 if (source.getWidth() != width || source.getHeight() != height) { in createBitmap()
1411 canvas.scale(width / (float) source.getWidth(), in createBitmap()
2099 int x, int y, int width, int height) { in getPixels() argument
2103 if (width == 0 || height == 0) { in getPixels()
2106 checkPixelsAccess(x, y, width, height, offset, stride, pixels); in getPixels()
2108 x, y, width, height); in getPixels()
2140 private void checkPixelsAccess(int x, int y, int width, int height, in checkPixelsAccess() argument
2143 if (width < 0) { in checkPixelsAccess()
2149 if (x + width > getWidth()) { in checkPixelsAccess()
2157 if (Math.abs(stride) < width) { in checkPixelsAccess()
2162 if (offset < 0 || (offset + width > length) in checkPixelsAccess()
2164 || (lastScanline + width > length)) { in checkPixelsAccess()
2216 int x, int y, int width, int height) { in setPixels() argument
2221 if (width == 0 || height == 0) { in setPixels()
2224 checkPixelsAccess(x, y, width, height, offset, stride, pixels); in setPixels()
2226 x, y, width, height); in setPixels()
2403 int stride, int width, int height, in nativeCreate() argument
2414 private static native void nativeReconfigure(long nativeBitmap, int width, int height, in nativeReconfigure() argument
2429 int width, int height); in nativeGetPixels() argument
2434 int width, int height); in nativeSetPixels() argument