Package org.robolectric.shadows
Class ShadowBitmap
java.lang.Object
org.robolectric.shadows.ShadowBitmap
- Direct Known Subclasses:
- ShadowLegacyBitmap,- ShadowNativeBitmap
@Implements(value=android.graphics.Bitmap.class,
            shadowPicker=Picker.class,
            looseSignatures=true)
public abstract class ShadowBitmap
extends Object
Base class for 
Bitmap shadows.- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidabstract BitmapReference to original Bitmap from which this Bitmap was created.abstract byte[]Bytes from which this Bitmap was created.abstract int[]Color array from which this Bitmap was created.abstract booleantrueif this Bitmap was created with filtering.abstract intHeight fromgetCreatedFromX()withingetCreatedFromBitmap()of this Bitmap's content, or -1.abstract MatrixMatrix from which this Bitmap's content was transformed, ornull.abstract StringPath from which this Bitmap was created.abstract intResource ID from which this Bitmap was created.abstract InputStreamInputStreamfrom which this Bitmap was created.abstract intWidth fromgetCreatedFromX()withingetCreatedFromBitmap()of this Bitmap's content, or -1.abstract intHorizontal offset withingetCreatedFromBitmap()of this Bitmap's content, or -1.abstract intVertical offset withingetCreatedFromBitmap()of this Bitmap's content, or -1.abstract Stringprotected booleanabstract voidprotected voidsetGainmap(Object gainmap) abstract voidsetMutable(boolean mutable) static StringReturns a textual representation of the appearance of the object.
- 
Constructor Details- 
ShadowBitmappublic ShadowBitmap()
 
- 
- 
Method Details- 
visualizeReturns a textual representation of the appearance of the object.- Parameters:
- bitmap- the bitmap to visualize
- Returns:
- Textual representation of the appearance of the object.
 
- 
getCreatedFromBitmapReference to original Bitmap from which this Bitmap was created.nullif this Bitmap was not copied from another instance.- Returns:
- Original Bitmap from which this Bitmap was created.
 
- 
getCreatedFromResIdpublic abstract int getCreatedFromResId()Resource ID from which this Bitmap was created.0if this Bitmap was not created from a resource.- Returns:
- Resource ID from which this Bitmap was created.
 
- 
getCreatedFromPathPath from which this Bitmap was created.nullif this Bitmap was not create from a path.- Returns:
- Path from which this Bitmap was created.
 
- 
getCreatedFromStreamInputStreamfrom which this Bitmap was created.nullif this Bitmap was not created from a stream.- Returns:
- InputStream from which this Bitmap was created.
 
- 
getCreatedFromBytespublic abstract byte[] getCreatedFromBytes()Bytes from which this Bitmap was created.nullif this Bitmap was not created from bytes.- Returns:
- Bytes from which this Bitmap was created.
 
- 
getCreatedFromXpublic abstract int getCreatedFromX()Horizontal offset withingetCreatedFromBitmap()of this Bitmap's content, or -1.- Returns:
- Horizontal offset within getCreatedFromBitmap().
 
- 
getCreatedFromYpublic abstract int getCreatedFromY()Vertical offset withingetCreatedFromBitmap()of this Bitmap's content, or -1.- Returns:
- Vertical offset within getCreatedFromBitmap()of this Bitmap's content, or -1.
 
- 
getCreatedFromWidthpublic abstract int getCreatedFromWidth()Width fromgetCreatedFromX()withingetCreatedFromBitmap()of this Bitmap's content, or -1.- Returns:
- Width from getCreatedFromX()withingetCreatedFromBitmap()of this Bitmap's content, or -1.
 
- 
getCreatedFromHeightpublic abstract int getCreatedFromHeight()Height fromgetCreatedFromX()withingetCreatedFromBitmap()of this Bitmap's content, or -1.- Returns:
- Height from getCreatedFromX()withingetCreatedFromBitmap()of this Bitmap's content, or -1.
 
- 
getCreatedFromColorspublic abstract int[] getCreatedFromColors()Color array from which this Bitmap was created.nullif this Bitmap was not created from a color array.- Returns:
- Color array from which this Bitmap was created.
 
- 
getCreatedFromMatrixMatrix from which this Bitmap's content was transformed, ornull.- Returns:
- Matrix from which this Bitmap's content was transformed, or null.
 
- 
getCreatedFromFilterpublic abstract boolean getCreatedFromFilter()trueif this Bitmap was created with filtering.- Returns:
- trueif this Bitmap was created with filtering.
 
- 
setMutablepublic abstract void setMutable(boolean mutable) 
- 
appendDescription
- 
getDescription
- 
setDescription
- 
setGainmap
- 
hasGainmap
 
-