@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) |
protected boolean |
compress(android.graphics.Bitmap.CompressFormat format,
int quality,
java.io.OutputStream stream) |
protected android.graphics.Bitmap |
copy(android.graphics.Bitmap.Config config,
boolean isMutable) |
protected void |
copyPixelsFromBuffer(java.nio.Buffer dst) |
protected void |
copyPixelsToBuffer(java.nio.Buffer dst) |
protected android.graphics.Bitmap |
createAshmemBitmap() |
protected static android.graphics.Bitmap |
createBitmap(android.graphics.Bitmap src) |
protected static android.graphics.Bitmap |
createBitmap(android.graphics.Bitmap src,
int x,
int y,
int width,
int height) |
protected static android.graphics.Bitmap |
createBitmap(android.graphics.Bitmap src,
int x,
int y,
int width,
int height,
android.graphics.Matrix matrix,
boolean filter) |
protected static android.graphics.Bitmap |
createBitmap(android.util.DisplayMetrics displayMetrics,
int width,
int height,
android.graphics.Bitmap.Config config) |
protected static android.graphics.Bitmap |
createBitmap(android.util.DisplayMetrics displayMetrics,
int width,
int height,
android.graphics.Bitmap.Config config,
boolean hasAlpha) |
protected static android.graphics.Bitmap |
createBitmap(int[] colors,
int width,
int height,
android.graphics.Bitmap.Config config) |
protected static android.graphics.Bitmap |
createBitmap(int width,
int height,
android.graphics.Bitmap.Config config) |
protected static android.graphics.Bitmap |
createScaledBitmap(android.graphics.Bitmap src,
int dstWidth,
int dstHeight,
boolean filter) |
protected void |
eraseColor(int c) |
protected int |
getAllocationByteCount() |
protected int |
getByteCount() |
static int |
getBytesPerPixel(android.graphics.Bitmap.Config config) |
protected 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. |
protected int |
getDensity() |
java.lang.String |
getDescription() |
protected int |
getGenerationId() |
protected int |
getHeight() |
protected int |
getPixel(int x,
int y) |
protected 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() |
protected int |
getRowBytes() |
protected int |
getWidth() |
protected boolean |
hasAlpha() |
protected boolean |
hasMipMap() |
protected boolean |
isMutable() |
protected boolean |
isPremultiplied() |
protected boolean |
isRecycled() |
protected static android.graphics.Bitmap |
nativeCreateFromParcel(android.os.Parcel p) |
protected void |
reconfigure(int width,
int height,
android.graphics.Bitmap.Config config) |
protected void |
recycle() |
protected boolean |
sameAs(android.graphics.Bitmap other) |
protected void |
setConfig(android.graphics.Bitmap.Config config) |
void |
setCreatedFromResId(int resId,
java.lang.String description) |
protected void |
setDensity(int density) |
void |
setDescription(java.lang.String s) |
protected void |
setHasAlpha(boolean hasAlpha) |
protected void |
setHasMipMap(boolean hasMipMap) |
protected void |
setHeight(int height) |
void |
setMutable(boolean mutable) |
protected void |
setPixel(int x,
int y,
int color) |
protected void |
setPixels(int[] pixels,
int offset,
int stride,
int x,
int y,
int width,
int height) |
protected void |
setPremultiplied(boolean isPremultiplied) |
protected void |
setWidth(int width) |
static java.lang.String |
visualize(android.graphics.Bitmap bitmap)
Returns a textual representation of the appearance of the object.
|
protected 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 protected boolean compress(android.graphics.Bitmap.CompressFormat format, int quality, java.io.OutputStream stream)
@Implementation protected static android.graphics.Bitmap createBitmap(int width, int height, android.graphics.Bitmap.Config config)
@Implementation(minSdk=17) protected static android.graphics.Bitmap createBitmap(android.util.DisplayMetrics displayMetrics, int width, int height, android.graphics.Bitmap.Config config, boolean hasAlpha)
@Implementation(minSdk=17) protected static android.graphics.Bitmap createBitmap(android.util.DisplayMetrics displayMetrics, int width, int height, android.graphics.Bitmap.Config config)
@Implementation protected static android.graphics.Bitmap createBitmap(android.graphics.Bitmap src)
@Implementation protected static android.graphics.Bitmap createScaledBitmap(android.graphics.Bitmap src, int dstWidth, int dstHeight, boolean filter)
@Implementation protected static android.graphics.Bitmap createBitmap(android.graphics.Bitmap src, int x, int y, int width, int height)
@Implementation protected void setPixels(int[] pixels, int offset, int stride, int x, int y, int width, int height)
@Implementation protected static android.graphics.Bitmap createBitmap(android.graphics.Bitmap src, int x, int y, int width, int height, android.graphics.Matrix matrix, boolean filter)
@Implementation protected static android.graphics.Bitmap createBitmap(int[] colors, int width, int height, android.graphics.Bitmap.Config config)
@Implementation protected int getPixel(int x, int y)
@Implementation protected void setPixel(int x, int y, int color)
@Implementation protected 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 protected int getRowBytes()
@Implementation protected int getByteCount()
@Implementation protected void recycle()
@Implementation protected final boolean isRecycled()
@Implementation protected android.graphics.Bitmap copy(android.graphics.Bitmap.Config config, boolean isMutable)
@Implementation(minSdk=19) protected final int getAllocationByteCount()
@Implementation protected final android.graphics.Bitmap.Config getConfig()
@Implementation(minSdk=19) protected void setConfig(android.graphics.Bitmap.Config config)
@Implementation protected 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 protected final boolean hasAlpha()
@Implementation protected void setHasAlpha(boolean hasAlpha)
@Implementation(minSdk=17) protected final boolean hasMipMap()
@Implementation(minSdk=17) protected final void setHasMipMap(boolean hasMipMap)
@Implementation(minSdk=19) protected void setWidth(int width)
@Implementation protected int getWidth()
@Implementation(minSdk=19) protected void setHeight(int height)
@Implementation protected int getHeight()
@Implementation protected void setDensity(int density)
@Implementation protected int getDensity()
@Implementation protected int getGenerationId()
@Implementation(minSdk=23) protected android.graphics.Bitmap createAshmemBitmap()
@Implementation protected void eraseColor(int c)
@Implementation protected void writeToParcel(android.os.Parcel p, int flags)
@Implementation protected static android.graphics.Bitmap nativeCreateFromParcel(android.os.Parcel p)
@Implementation protected void copyPixelsFromBuffer(java.nio.Buffer dst)
@Implementation protected void copyPixelsToBuffer(java.nio.Buffer dst)
@Implementation(minSdk=19) protected void reconfigure(int width, int height, android.graphics.Bitmap.Config config)
@Implementation(minSdk=19) protected void setPremultiplied(boolean isPremultiplied)
@Implementation(minSdk=19) protected boolean isPremultiplied()
@Implementation protected boolean sameAs(android.graphics.Bitmap other)
public android.graphics.Bitmap getRealBitmap()
public static int getBytesPerPixel(android.graphics.Bitmap.Config config)
public void setCreatedFromResId(int resId, java.lang.String description)