Lines Matching defs:bitmap
51 * Assigns the pixel data of the specified bitmap.
53 * The RGBA pixel data will be extracted from the bitmap and assigned to the frame data. Note,
58 * @param bitmap The bitmap pixels to assign.
60 public void setBitmap(Bitmap bitmap) {
61 bitmap = convertToFrameType(bitmap, mBackingStore.getFrameType());
62 validateBitmapSize(bitmap, mBackingStore.getDimensions());
64 backing.setData(bitmap);
116 private static Bitmap convertToFrameType(Bitmap bitmap, FrameType type) {
117 Bitmap.Config config = bitmap.getConfig();
118 Bitmap result = bitmap;
122 result = bitmap.copy(Bitmap.Config.ARGB_8888, false);
124 throw new RuntimeException("Could not convert bitmap to frame-type " +
131 "bitmap assignment!");
136 private void validateBitmapSize(Bitmap bitmap, int[] dimensions) {
137 if (bitmap.getWidth() != dimensions[0] || bitmap.getHeight() != dimensions[1]) {
138 throw new IllegalArgumentException("Cannot assign bitmap of size " + bitmap.getWidth()
139 + "x" + bitmap.getHeight() + " to frame of size " + dimensions[0] + "x"
174 // Draw source bitmap into target canvas
180 // Assign bitmap to output frame