-
public abstract class PlatformBitmapFactoryBitmap factory optimized for the platform.
-
-
Method Summary
Modifier and Type Method Description CloseableReference<Bitmap>createBitmap(int width, int height, Bitmap.Config bitmapConfig)Creates a bitmap of the specified width and height. CloseableReference<Bitmap>createBitmap(int width, int height)Creates a bitmap of the specified width and height. CloseableReference<Bitmap>createBitmap(int width, int height, Bitmap.Config bitmapConfig, @Nullable() Object callerContext)Creates a bitmap of the specified width and height. CloseableReference<Bitmap>createBitmap(int width, int height, @Nullable() Object callerContext)Creates a bitmap of the specified width and height. CloseableReference<Bitmap>createBitmap(Bitmap source)Creates a bitmap from the specified source bitmap. CloseableReference<Bitmap>createBitmap(Bitmap source, @Nullable() Object callerContext)Creates a bitmap from the specified source bitmap. CloseableReference<Bitmap>createBitmap(Bitmap source, int x, int y, int width, int height)Creates a bitmap from the specified subset of the source bitmap. CloseableReference<Bitmap>createBitmap(Bitmap source, int x, int y, int width, int height, @Nullable() Object callerContext)Creates a bitmap from the specified subset of the source bitmap. CloseableReference<Bitmap>createBitmap(Bitmap source, int x, int y, int width, int height, @Nullable() Matrix matrix, boolean filter)Creates a bitmap from subset of the source bitmap, transformed by the optional matrix. CloseableReference<Bitmap>createScaledBitmap(Bitmap source, int destinationWidth, int destinationHeight, boolean filter)Creates a bitmap from the specified source scaled to have the height and width as specified. CloseableReference<Bitmap>createScaledBitmap(Bitmap source, int destinationWidth, int destinationHeight, boolean filter, @Nullable() Object callerContext)Creates a bitmap from the specified source scaled to have the height and width as specified. CloseableReference<Bitmap>createBitmap(Bitmap source, int x, int y, int width, int height, @Nullable() Matrix matrix, boolean filter, @Nullable() Object callerContext)Creates a bitmap from subset of the source bitmap, transformed by the optional matrix. CloseableReference<Bitmap>createBitmap(DisplayMetrics display, int width, int height, Bitmap.Config config)Creates a bitmap with the specified width and height. CloseableReference<Bitmap>createBitmap(DisplayMetrics display, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)Creates a bitmap with the specified width and height. CloseableReference<Bitmap>createBitmap(Array<int> colors, int width, int height, Bitmap.Config config)Creates a bitmap with the specified width and height. CloseableReference<Bitmap>createBitmap(Array<int> colors, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)Creates a bitmap with the specified width and height. CloseableReference<Bitmap>createBitmap(DisplayMetrics display, Array<int> colors, int width, int height, Bitmap.Config config)Creates a bitmap with the specified width and height. CloseableReference<Bitmap>createBitmap(DisplayMetrics display, Array<int> colors, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)Creates a bitmap with the specified width and height. CloseableReference<Bitmap>createBitmap(DisplayMetrics display, Array<int> colors, int offset, int stride, int width, int height, Bitmap.Config config)Creates a bitmap with the specified width and height. CloseableReference<Bitmap>createBitmap(DisplayMetrics display, Array<int> colors, int offset, int stride, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)Creates a bitmap with the specified width and height. abstract CloseableReference<Bitmap>createBitmapInternal(int width, int height, Bitmap.Config bitmapConfig)Creates a bitmap of the specified width and height. -
-
Method Detail
-
createBitmap
CloseableReference<Bitmap> createBitmap(int width, int height, Bitmap.Config bitmapConfig)
Creates a bitmap of the specified width and height.
- Parameters:
width- the width of the bitmapheight- the height of the bitmapbitmapConfig- the Bitmap.
-
createBitmap
CloseableReference<Bitmap> createBitmap(int width, int height)
Creates a bitmap of the specified width and height. The bitmap will be created with the defaultARGB_8888 configuration
- Parameters:
width- the width of the bitmapheight- the height of the bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(int width, int height, Bitmap.Config bitmapConfig, @Nullable() Object callerContext)
Creates a bitmap of the specified width and height.
- Parameters:
width- the width of the bitmapheight- the height of the bitmapbitmapConfig- the Bitmap.callerContext- the Tag to track who create the Bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(int width, int height, @Nullable() Object callerContext)
Creates a bitmap of the specified width and height. The bitmap will be created with the defaultARGB_8888 configuration
- Parameters:
width- the width of the bitmapheight- the height of the bitmapcallerContext- the Tag to track who create the Bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(Bitmap source)
Creates a bitmap from the specified source bitmap. It is initialized with the same density asthe original bitmap.
- Parameters:
source- The bitmap we are copying
-
createBitmap
CloseableReference<Bitmap> createBitmap(Bitmap source, @Nullable() Object callerContext)
Creates a bitmap from the specified source bitmap. It is initialized with the same density asthe original bitmap.
- Parameters:
source- The bitmap we are copyingcallerContext- the Tag to track who create the Bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(Bitmap source, int x, int y, int width, int height)
Creates a bitmap from the specified subset of the source bitmap. It is initialized with thesame density as the original bitmap.
- Parameters:
source- The bitmap we are subsettingx- The x coordinate of the first pixel in sourcey- The y coordinate of the first pixel in sourcewidth- The number of pixels in each rowheight- The number of rows
-
createBitmap
CloseableReference<Bitmap> createBitmap(Bitmap source, int x, int y, int width, int height, @Nullable() Object callerContext)
Creates a bitmap from the specified subset of the source bitmap. It is initialized with thesame density as the original bitmap.
- Parameters:
source- The bitmap we are subsettingx- The x coordinate of the first pixel in sourcey- The y coordinate of the first pixel in sourcewidth- The number of pixels in each rowheight- The number of rowscallerContext- the Tag to track who create the Bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(Bitmap source, int x, int y, int width, int height, @Nullable() Matrix matrix, boolean filter)
Creates a bitmap from subset of the source bitmap, transformed by the optional matrix. It isinitialized with the same density as the original bitmap.
- Parameters:
source- The bitmap we are subsettingx- The x coordinate of the first pixel in sourcey- The y coordinate of the first pixel in sourcewidth- The number of pixels in each rowheight- The number of rowsmatrix- Optional matrix to be applied to the pixelsfilter- true if the source should be filtered.
-
createScaledBitmap
CloseableReference<Bitmap> createScaledBitmap(Bitmap source, int destinationWidth, int destinationHeight, boolean filter)
Creates a bitmap from the specified source scaled to have the height and width as specified. Itis initialized with the same density as the original bitmap.
- Parameters:
source- The bitmap we are subsettingdestinationWidth- The number of pixels in each row of the final bitmapdestinationHeight- The number of rows in the final bitmap
-
createScaledBitmap
CloseableReference<Bitmap> createScaledBitmap(Bitmap source, int destinationWidth, int destinationHeight, boolean filter, @Nullable() Object callerContext)
Creates a bitmap from the specified source scaled to have the height and width as specified. Itis initialized with the same density as the original bitmap.
- Parameters:
source- The bitmap we are subsettingdestinationWidth- The number of pixels in each row of the final bitmapdestinationHeight- The number of rows in the final bitmapcallerContext- the Tag to track who create the Bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(Bitmap source, int x, int y, int width, int height, @Nullable() Matrix matrix, boolean filter, @Nullable() Object callerContext)
Creates a bitmap from subset of the source bitmap, transformed by the optional matrix. It isinitialized with the same density as the original bitmap.
- Parameters:
source- The bitmap we are subsettingx- The x coordinate of the first pixel in sourcey- The y coordinate of the first pixel in sourcewidth- The number of pixels in each rowheight- The number of rowsmatrix- Optional matrix to be applied to the pixelsfilter- true if the source should be filtered.callerContext- the Tag to track who create the Bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(DisplayMetrics display, int width, int height, Bitmap.Config config)
Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.
- Parameters:
display- Display metrics for the display this bitmap will be drawn on.width- The width of the bitmapheight- The height of the bitmapconfig- The bitmap config to create.
-
createBitmap
CloseableReference<Bitmap> createBitmap(DisplayMetrics display, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)
Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.
- Parameters:
display- Display metrics for the display this bitmap will be drawn on.width- The width of the bitmapheight- The height of the bitmapconfig- The bitmap config to create.callerContext- the Tag to track who create the Bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(Array<int> colors, int width, int height, Bitmap.Config config)
Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.
- Parameters:
colors- The colors to write to the bitmapwidth- The width of the bitmapheight- The height of the bitmapconfig- The bitmap config to create
-
createBitmap
CloseableReference<Bitmap> createBitmap(Array<int> colors, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)
Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.
- Parameters:
colors- The colors to write to the bitmapwidth- The width of the bitmapheight- The height of the bitmapconfig- The bitmap config to createcallerContext- the Tag to track who create the Bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(DisplayMetrics display, Array<int> colors, int width, int height, Bitmap.Config config)
Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.
- Parameters:
display- Display metrics for the display this bitmap will be drawn oncolors- The colors to write to the bitmapwidth- The width of the bitmapheight- The height of the bitmapconfig- The bitmap config to create
-
createBitmap
CloseableReference<Bitmap> createBitmap(DisplayMetrics display, Array<int> colors, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)
Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.
- Parameters:
display- Display metrics for the display this bitmap will be drawn oncolors- The colors to write to the bitmapwidth- The width of the bitmapheight- The height of the bitmapconfig- The bitmap config to createcallerContext- the Tag to track who create the Bitmap
-
createBitmap
CloseableReference<Bitmap> createBitmap(DisplayMetrics display, Array<int> colors, int offset, int stride, int width, int height, Bitmap.Config config)
Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.
- Parameters:
display- Display metrics for the display this bitmap will be drawn oncolors- The colors to write to the bitmapoffset- The index of the first color to read from colors[]stride- The number of colors in pixels[] to skip between rows.width- The width of the bitmapheight- The height of the bitmapconfig- The bitmap config to create
-
createBitmap
CloseableReference<Bitmap> createBitmap(DisplayMetrics display, Array<int> colors, int offset, int stride, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)
Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.
- Parameters:
display- Display metrics for the display this bitmap will be drawn oncolors- The colors to write to the bitmapoffset- The index of the first color to read from colors[]stride- The number of colors in pixels[] to skip between rows.width- The width of the bitmapheight- The height of the bitmapconfig- The bitmap config to createcallerContext- the Tag to track who create the Bitmap
-
createBitmapInternal
abstract CloseableReference<Bitmap> createBitmapInternal(int width, int height, Bitmap.Config bitmapConfig)
Creates a bitmap of the specified width and height. This is intended for ImagePipeline'sinternal use only.
- Parameters:
width- the width of the bitmapheight- the height of the bitmapbitmapConfig- the Bitmap.
-
-
-
-