Lines Matching defs:bitmap

55  * A Drawable that wraps a bitmap and can be tiled, stretched, or aligned. You can create a
58 * <p>It can be defined in an XML file with the <code>&lt;bitmap></code> element. For more
63 * transformation of raw bitmap graphics, and should be used when drawing to a
109 * instead to specify a bitmap to draw with and ensure the correct density is set.
121 * instead to specify a bitmap to draw with.
131 * Create drawable from a bitmap, not dealing with density.
136 public BitmapDrawable(Bitmap bitmap) {
137 this(new BitmapState(bitmap), null);
141 * Create drawable from a bitmap, setting initial target density based on
144 public BitmapDrawable(Resources res, Bitmap bitmap) {
145 this(new BitmapState(bitmap), res);
150 * Create a drawable by opening a given file path and decoding the bitmap.
163 * Create a drawable by opening a given file path and decoding the bitmap.
175 * Create a drawable by decoding a bitmap from the given input stream.
188 * Create a drawable by decoding a bitmap from the given input stream.
207 * Returns the bitmap used by this drawable to render. May be null.
214 final Bitmap bitmap = mBitmapState.mBitmap;
215 if (bitmap != null) {
216 mBitmapWidth = bitmap.getScaledWidth(mTargetDensity);
217 mBitmapHeight = bitmap.getScaledHeight(mTargetDensity);
224 public void setBitmap(Bitmap bitmap) {
225 if (mBitmapState.mBitmap != bitmap) {
226 mBitmapState.mBitmap = bitmap;
276 /** Get the gravity used to position/stretch the bitmap within its bounds.
278 * @return the gravity applied to the bitmap
284 /** Set the gravity used to position/stretch the bitmap within its bounds.
297 * Enables or disables the mipmap hint for this drawable's bitmap.
300 * If the bitmap is null calling this method has no effect.
302 * @param mipMap True if the bitmap should use mipmaps, false otherwise.
314 * Indicates whether the mipmap hint is enabled on this drawable's bitmap.
316 * @return True if the mipmap hint is set, false otherwise. If the bitmap
328 * the edges of the bitmap only so it applies only when the drawable is rotated.
330 * @param aa True if the bitmap should be anti-aliased, false otherwise.
370 * @return {@link android.graphics.Shader.TileMode#CLAMP} if the bitmap does not repeat,
381 * @return {@link android.graphics.Shader.TileMode#CLAMP} if the bitmap does not repeat,
391 * does not repeat its bitmap. Using {@link android.graphics.Shader.TileMode#REPEAT} or
392 * {@link android.graphics.Shader.TileMode#MIRROR} the bitmap can be repeated (or tiled)
393 * if the bitmap is smaller than this drawable.
407 * does not repeat its bitmap. Using {@link android.graphics.Shader.TileMode#REPEAT} or
408 * {@link android.graphics.Shader.TileMode#MIRROR} the bitmap can be repeated (or tiled)
409 * if the bitmap is smaller than this drawable.
423 * does not repeat its bitmap. Using {@link android.graphics.Shader.TileMode#REPEAT} or
424 * {@link android.graphics.Shader.TileMode#MIRROR} the bitmap can be repeated (or tiled)
425 * if the bitmap is smaller than this drawable.
496 final Bitmap bitmap = mBitmapState.mBitmap;
497 if (bitmap == null) {
509 paint.setShader(new BitmapShader(bitmap,
540 // Mirror the bitmap
545 canvas.drawBitmap(bitmap, null, mDstRect, paint);
552 // Mirror the bitmap
750 ": <bitmap> requires a valid 'src' attribute");
769 final Bitmap bitmap = BitmapFactory.decodeResource(r, srcResId);
770 if (bitmap == null) {
772 ": <bitmap> requires a valid 'src' attribute");
775 state.mBitmap = bitmap;
888 final Bitmap bitmap = mBitmapState.mBitmap;
889 return (bitmap == null || bitmap.hasAlpha() || mBitmapState.mPaint.getAlpha() < 255) ?
917 BitmapState(Bitmap bitmap) {
918 mBitmap = bitmap;