android.graphics
Class Bitmap
java.lang.Object
android.graphics.Bitmap
- All Implemented Interfaces:
- Parcelable
public final class Bitmap
- extends Object
- implements Parcelable
Method Summary |
boolean |
compress(Bitmap.CompressFormat format,
int quality,
OutputStream stream)
|
Bitmap |
copy(Bitmap.Config config,
boolean isMutable)
|
void |
copyPixelsFromBuffer(Buffer src)
|
void |
copyPixelsToBuffer(Buffer dst)
|
static Bitmap |
createBitmap(Bitmap src)
|
static Bitmap |
createBitmap(Bitmap source,
int x,
int y,
int width,
int height)
|
static Bitmap |
createBitmap(Bitmap source,
int x,
int y,
int width,
int height,
Matrix m,
boolean filter)
|
static Bitmap |
createBitmap(int[] colors,
int width,
int height,
Bitmap.Config config)
|
static Bitmap |
createBitmap(int[] colors,
int offset,
int stride,
int width,
int height,
Bitmap.Config config)
|
static Bitmap |
createBitmap(int width,
int height,
Bitmap.Config config)
|
static Bitmap |
createScaledBitmap(Bitmap src,
int dstWidth,
int dstHeight,
boolean filter)
|
int |
describeContents()
|
void |
eraseColor(int c)
|
Bitmap |
extractAlpha()
|
Bitmap |
extractAlpha(Paint paint,
int[] offsetXY)
|
int |
getByteCount()
|
Bitmap.Config |
getConfig()
|
int |
getDensity()
|
int |
getGenerationId()
|
int |
getHeight()
|
byte[] |
getNinePatchChunk()
|
int |
getPixel(int x,
int y)
|
void |
getPixels(int[] pixels,
int offset,
int stride,
int x,
int y,
int width,
int height)
|
int |
getRowBytes()
|
int |
getScaledHeight(Canvas canvas)
|
int |
getScaledHeight(DisplayMetrics metrics)
|
int |
getScaledHeight(int targetDensity)
|
int |
getScaledWidth(Canvas canvas)
|
int |
getScaledWidth(DisplayMetrics metrics)
|
int |
getScaledWidth(int targetDensity)
|
int |
getWidth()
|
boolean |
hasAlpha()
|
boolean |
isMutable()
|
boolean |
isRecycled()
|
void |
prepareToDraw()
|
void |
recycle()
|
boolean |
sameAs(Bitmap other)
|
void |
setDensity(int density)
|
void |
setHasAlpha(boolean hasAlpha)
|
void |
setPixel(int x,
int y,
int color)
|
void |
setPixels(int[] pixels,
int offset,
int stride,
int x,
int y,
int width,
int height)
|
void |
writeToParcel(Parcel p,
int flags)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DENSITY_NONE
public static final int DENSITY_NONE
- See Also:
- Constant Field Values
CREATOR
public static final Parcelable.Creator<Bitmap> CREATOR
getDensity
public int getDensity()
setDensity
public void setDensity(int density)
recycle
public void recycle()
isRecycled
public final boolean isRecycled()
getGenerationId
public int getGenerationId()
copyPixelsToBuffer
public void copyPixelsToBuffer(Buffer dst)
copyPixelsFromBuffer
public void copyPixelsFromBuffer(Buffer src)
copy
public Bitmap copy(Bitmap.Config config,
boolean isMutable)
createScaledBitmap
public static Bitmap createScaledBitmap(Bitmap src,
int dstWidth,
int dstHeight,
boolean filter)
createBitmap
public static Bitmap createBitmap(Bitmap src)
createBitmap
public static Bitmap createBitmap(Bitmap source,
int x,
int y,
int width,
int height)
createBitmap
public static Bitmap createBitmap(Bitmap source,
int x,
int y,
int width,
int height,
Matrix m,
boolean filter)
createBitmap
public static Bitmap createBitmap(int width,
int height,
Bitmap.Config config)
createBitmap
public static Bitmap createBitmap(int[] colors,
int offset,
int stride,
int width,
int height,
Bitmap.Config config)
createBitmap
public static Bitmap createBitmap(int[] colors,
int width,
int height,
Bitmap.Config config)
getNinePatchChunk
public byte[] getNinePatchChunk()
compress
public boolean compress(Bitmap.CompressFormat format,
int quality,
OutputStream stream)
isMutable
public final boolean isMutable()
getWidth
public final int getWidth()
getHeight
public final int getHeight()
getScaledWidth
public int getScaledWidth(Canvas canvas)
getScaledHeight
public int getScaledHeight(Canvas canvas)
getScaledWidth
public int getScaledWidth(DisplayMetrics metrics)
getScaledHeight
public int getScaledHeight(DisplayMetrics metrics)
getScaledWidth
public int getScaledWidth(int targetDensity)
getScaledHeight
public int getScaledHeight(int targetDensity)
getRowBytes
public final int getRowBytes()
getByteCount
public final int getByteCount()
getConfig
public final Bitmap.Config getConfig()
hasAlpha
public final boolean hasAlpha()
setHasAlpha
public void setHasAlpha(boolean hasAlpha)
eraseColor
public void eraseColor(int c)
getPixel
public int getPixel(int x,
int y)
getPixels
public void getPixels(int[] pixels,
int offset,
int stride,
int x,
int y,
int width,
int height)
setPixel
public void setPixel(int x,
int y,
int color)
setPixels
public void setPixels(int[] pixels,
int offset,
int stride,
int x,
int y,
int width,
int height)
describeContents
public int describeContents()
- Specified by:
describeContents
in interface Parcelable
writeToParcel
public void writeToParcel(Parcel p,
int flags)
- Specified by:
writeToParcel
in interface Parcelable
extractAlpha
public Bitmap extractAlpha()
extractAlpha
public Bitmap extractAlpha(Paint paint,
int[] offsetXY)
sameAs
public boolean sameAs(Bitmap other)
prepareToDraw
public void prepareToDraw()
Copyright © 2008-2012. All Rights Reserved.