@Implements(value=android.graphics.Bitmap.class) public class ShadowBitmap extends java.lang.Object
Constructor and Description |
---|
ShadowBitmap() |
Modifier and Type | Method and Description |
---|---|
void |
appendDescription(java.lang.String s) |
boolean |
compress(android.graphics.Bitmap.CompressFormat format,
int quality,
java.io.OutputStream stream) |
android.graphics.Bitmap |
copy(android.graphics.Bitmap.Config config,
boolean isMutable) |
void |
copyPixelsFromBuffer(java.nio.Buffer dst) |
void |
copyPixelsToBuffer(java.nio.Buffer dst) |
android.graphics.Bitmap |
createAshmemBitmap() |
static android.graphics.Bitmap |
createBitmap(android.graphics.Bitmap src) |
static android.graphics.Bitmap |
createBitmap(android.graphics.Bitmap src,
int x,
int y,
int width,
int height) |
static android.graphics.Bitmap |
createBitmap(android.graphics.Bitmap src,
int x,
int y,
int width,
int height,
android.graphics.Matrix matrix,
boolean filter) |
static android.graphics.Bitmap |
createBitmap(android.util.DisplayMetrics displayMetrics,
int width,
int height,
android.graphics.Bitmap.Config config) |
static android.graphics.Bitmap |
createBitmap(android.util.DisplayMetrics displayMetrics,
int width,
int height,
android.graphics.Bitmap.Config config,
boolean hasAlpha) |
static android.graphics.Bitmap |
createBitmap(int[] colors,
int width,
int height,
android.graphics.Bitmap.Config config) |
static android.graphics.Bitmap |
createBitmap(int width,
int height,
android.graphics.Bitmap.Config config) |
static android.graphics.Bitmap |
createScaledBitmap(android.graphics.Bitmap src,
int dstWidth,
int dstHeight,
boolean filter) |
void |
eraseColor(int c) |
int |
getByteCount() |
static int |
getBytesPerPixel(android.graphics.Bitmap.Config config) |
android.graphics.Bitmap.Config |
getConfig() |
android.graphics.Bitmap |
getCreatedFromBitmap()
Reference to original Bitmap from which this Bitmap was created.
|
byte[] |
getCreatedFromBytes()
Bytes from which this Bitmap was created.
|
int[] |
getCreatedFromColors()
Color array from which this Bitmap was created.
|
boolean |
getCreatedFromFilter()
true if this Bitmap was created with filtering. |
int |
getCreatedFromHeight()
Height from
getCreatedFromX() within getCreatedFromBitmap() of this Bitmap’s content, or -1. |
android.graphics.Matrix |
getCreatedFromMatrix()
Matrix from which this Bitmap’s content was transformed, or
null . |
java.lang.String |
getCreatedFromPath()
Path from which this Bitmap was created.
|
int |
getCreatedFromResId()
Resource ID from which this Bitmap was created.
|
java.io.InputStream |
getCreatedFromStream()
InputStream from which this Bitmap was created. |
int |
getCreatedFromWidth()
Width from
getCreatedFromX() within getCreatedFromBitmap() of this Bitmap’s content, or -1. |
int |
getCreatedFromX()
Horizontal offset within
getCreatedFromBitmap() of this Bitmap’s content, or -1. |
int |
getCreatedFromY()
Vertical offset within
getCreatedFromBitmap() of this Bitmap’s content, or -1. |
int |
getDensity() |
java.lang.String |
getDescription() |
int |
getGenerationId() |
int |
getHeight() |
int |
getPixel(int x,
int y) |
void |
getPixels(int[] pixels,
int offset,
int stride,
int x,
int y,
int width,
int height)
Note that this method will return a RuntimeException unless: -
pixels has the same length as the number of pixels of the bitmap. |
android.graphics.Bitmap |
getRealBitmap() |
int |
getRowBytes() |
int |
getWidth() |
boolean |
hasAlpha() |
boolean |
hasMipMap() |
boolean |
isMutable() |
boolean |
isRecycled() |
static android.graphics.Bitmap |
nativeCreateFromParcel(android.os.Parcel p) |
void |
recycle() |
void |
setConfig(android.graphics.Bitmap.Config config) |
void |
setCreatedFromResId(int resId,
java.lang.String description) |
void |
setDensity(int density) |
void |
setDescription(java.lang.String s) |
void |
setHasAlpha(boolean hasAlpha) |
void |
setHasMipMap(boolean hasMipMap) |
void |
setHeight(int height) |
void |
setMutable(boolean mutable) |
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 |
setWidth(int width) |
java.lang.String |
toString() |
static java.lang.String |
visualize(android.graphics.Bitmap bitmap)
Returns a textual representation of the appearance of the object.
|
void |
writeToParcel(android.os.Parcel p,
int flags) |
public static java.lang.String visualize(android.graphics.Bitmap bitmap)
Returns a textual representation of the appearance of the object.
bitmap
- the bitmap to visualizepublic android.graphics.Bitmap getCreatedFromBitmap()
Reference to original Bitmap from which this Bitmap was created. null
if this Bitmap was not copied from another instance.
public int getCreatedFromResId()
Resource ID from which this Bitmap was created. 0
if this Bitmap was not created from a resource.
public java.lang.String getCreatedFromPath()
Path from which this Bitmap was created. null
if this Bitmap was not create from a path.
public java.io.InputStream getCreatedFromStream()
InputStream
from which this Bitmap was created. null
if this Bitmap was not created from a stream.
public byte[] getCreatedFromBytes()
Bytes from which this Bitmap was created. null
if this Bitmap was not created from bytes.
public int getCreatedFromX()
Horizontal offset within getCreatedFromBitmap()
of this Bitmap’s content, or -1.
getCreatedFromBitmap()
.public int getCreatedFromY()
Vertical offset within getCreatedFromBitmap()
of this Bitmap’s content, or -1.
getCreatedFromBitmap()
of this Bitmap’s content, or -1.public int getCreatedFromWidth()
Width from getCreatedFromX()
within getCreatedFromBitmap()
of this Bitmap’s content, or -1.
getCreatedFromX()
within getCreatedFromBitmap()
of this Bitmap’s content, or -1.public int getCreatedFromHeight()
Height from getCreatedFromX()
within getCreatedFromBitmap()
of this Bitmap’s content, or -1.
getCreatedFromX()
within getCreatedFromBitmap()
of this Bitmap’s content, or -1.public int[] getCreatedFromColors()
Color array from which this Bitmap was created. null
if this Bitmap was not created from a color array.
public android.graphics.Matrix getCreatedFromMatrix()
Matrix from which this Bitmap’s content was transformed, or null
.
null
.public boolean getCreatedFromFilter()
true
if this Bitmap was created with filtering.
true
if this Bitmap was created with filtering.@Implementation public boolean compress(android.graphics.Bitmap.CompressFormat format, int quality, java.io.OutputStream stream)
@Implementation public static android.graphics.Bitmap createBitmap(int width, int height, android.graphics.Bitmap.Config config)
@Implementation public static android.graphics.Bitmap createBitmap(android.util.DisplayMetrics displayMetrics, int width, int height, android.graphics.Bitmap.Config config, boolean hasAlpha)
@Implementation public static android.graphics.Bitmap createBitmap(android.util.DisplayMetrics displayMetrics, int width, int height, android.graphics.Bitmap.Config config)
@Implementation public static android.graphics.Bitmap createBitmap(android.graphics.Bitmap src)
@Implementation public static android.graphics.Bitmap createScaledBitmap(android.graphics.Bitmap src, int dstWidth, int dstHeight, boolean filter)
@Implementation public static android.graphics.Bitmap createBitmap(android.graphics.Bitmap src, int x, int y, int width, int height)
@Implementation public void setPixels(int[] pixels, int offset, int stride, int x, int y, int width, int height)
@Implementation public static android.graphics.Bitmap createBitmap(android.graphics.Bitmap src, int x, int y, int width, int height, android.graphics.Matrix matrix, boolean filter)
@Implementation public static android.graphics.Bitmap createBitmap(int[] colors, int width, int height, android.graphics.Bitmap.Config config)
@Implementation public int getPixel(int x, int y)
@Implementation public void setPixel(int x, int y, int color)
@Implementation public void getPixels(int[] pixels, int offset, int stride, int x, int y, int width, int height)
Note that this method will return a RuntimeException unless: - pixels
has the same length as the number of pixels of the bitmap. - x = 0
- y = 0
- width
and height
height match the current bitmap’s dimensions.
@Implementation public int getRowBytes()
@Implementation public int getByteCount()
@Implementation public void recycle()
@Implementation public final boolean isRecycled()
@Implementation public android.graphics.Bitmap copy(android.graphics.Bitmap.Config config, boolean isMutable)
@Implementation public final android.graphics.Bitmap.Config getConfig()
@Implementation public void setConfig(android.graphics.Bitmap.Config config)
@Implementation public final boolean isMutable()
public void setMutable(boolean mutable)
public void appendDescription(java.lang.String s)
public void setDescription(java.lang.String s)
public java.lang.String getDescription()
@Implementation public final boolean hasAlpha()
@Implementation public void setHasAlpha(boolean hasAlpha)
@Implementation public final boolean hasMipMap()
@Implementation public final void setHasMipMap(boolean hasMipMap)
@Implementation public void setWidth(int width)
@Implementation public int getWidth()
@Implementation public void setHeight(int height)
@Implementation public int getHeight()
@Implementation public void setDensity(int density)
@Implementation public int getDensity()
@Implementation public int getGenerationId()
@Implementation public android.graphics.Bitmap createAshmemBitmap()
@Implementation public void eraseColor(int c)
@Implementation public void writeToParcel(android.os.Parcel p, int flags)
@Implementation public static android.graphics.Bitmap nativeCreateFromParcel(android.os.Parcel p)
@Implementation public void copyPixelsFromBuffer(java.nio.Buffer dst)
@Implementation public void copyPixelsToBuffer(java.nio.Buffer dst)
public java.lang.String toString()
toString
in class java.lang.Object
public android.graphics.Bitmap getRealBitmap()
public static int getBytesPerPixel(android.graphics.Bitmap.Config config)
public void setCreatedFromResId(int resId, java.lang.String description)