Home | History | Annotate | Download | only in launcher3

Lines Matching defs:bitmap

37 import android.graphics.Bitmap;
156 public static Bitmap createIconBitmap(Cursor c, int iconIndex, Context context) {
166 * Returns a bitmap suitable for the all apps view. If the package or the resource do not
169 public static Bitmap createIconBitmap(String packageName, String resourceName,
192 * Returns a bitmap which is of the appropriate size to be displayed as an icon
194 public static Bitmap createIconBitmap(Bitmap icon, Context context) {
203 * Returns a bitmap suitable for the all apps view. The icon is badged for {@param user}.
204 * The bitmap is also visually normalized with other icons.
207 public static Bitmap createBadgedIconBitmap(
211 Bitmap bitmap = createIconBitmap(icon, context, scale);
214 BitmapDrawable drawable = new FixedSizeBitmapDrawable(bitmap);
223 return bitmap;
228 * Returns a bitmap suitable for the all apps view.
230 public static Bitmap createIconBitmap(Drawable icon, Context context) {
237 public static Bitmap createIconBitmap(Drawable icon, Context context, float scale) {
249 // Ensure the bitmap has a density.
251 Bitmap bitmap = bitmapDrawable.getBitmap();
252 if (bitmap != null && bitmap.getDensity() == Bitmap.DENSITY_NONE) {
272 final Bitmap bitmap = Bitmap.createBitmap(textureWidth, textureHeight,
273 Bitmap.Config.ARGB_8888);
275 canvas.setBitmap(bitmap);
300 return bitmap;
480 * @param bitmap The bitmap to scan
483 static int findDominantColorByHue(Bitmap bitmap, int samples) {
484 final int height = bitmap.getHeight();
485 final int width = bitmap.getWidth();
502 int argb = bitmap.getPixel(x, y);
534 int rgb = bitmap.getPixel(x, y) | 0xff000000;
623 * Compresses the bitmap to a byte array for serialization.
625 public static byte[] flattenBitmap(Bitmap bitmap) {
628 int size = bitmap.getWidth() * bitmap.getHeight() * 4;
631 bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
636 Log.w(TAG, "Could not write bitmap");
818 * An extension of {@link BitmapDrawable} which returns the bitmap pixel size as intrinsic size.
819 * This allows the badging to be done based on the action bitmap size rather than
820 * the scaled bitmap size.
824 public FixedSizeBitmapDrawable(Bitmap bitmap) {
825 super(null, bitmap);