Lines Matching refs:Bitmap
23 import android.graphics.Bitmap;
66 * Returns a bitmap suitable for the all apps view. Used to convert pre-ICS
70 static Bitmap createIconBitmap(Bitmap icon, Context context) {
77 return Bitmap.createBitmap(icon,
85 // Icon is too small, render to a larger bitmap
91 * Returns a bitmap suitable for the all apps view.
93 static Bitmap createIconBitmap(Drawable icon, Context context) {
107 // Ensure the bitmap has a density.
109 Bitmap bitmap = bitmapDrawable.getBitmap();
110 if (bitmap.getDensity() == Bitmap.DENSITY_NONE) {
138 final Bitmap bitmap = Bitmap.createBitmap(textureWidth, textureHeight,
139 Bitmap.Config.ARGB_8888);
141 canvas.setBitmap(bitmap);
161 return bitmap;
166 boolean pressed, Bitmap src) {
178 Bitmap mask = src.extractAlpha(sBlurPaint, xy);
190 * Returns a Bitmap representing the thumbnail of the specified Bitmap.
194 * @param bitmap The bitmap to get a thumbnail of.
197 * @return A thumbnail for the specified bitmap or the bitmap itself if the
200 static Bitmap resampleIconBitmap(Bitmap bitmap, Context context) {
206 if (bitmap.getWidth() == sIconWidth && bitmap.getHeight() == sIconHeight) {
207 return bitmap;
209 return createIconBitmap(new BitmapDrawable(bitmap), context);
214 static Bitmap drawDisabledBitmap(Bitmap bitmap, Context context) {
219 final Bitmap disabled = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(),
220 Bitmap.Config.ARGB_8888);
224 canvas.drawBitmap(bitmap, 0.0f, 0.0f, sDisabledPaint);