public abstract class RasterDecoder extends Decoder
Decoder.SOURCE
ENABLE_HARD_CACHE, resourceId, sourceType
Constructor and Description |
---|
RasterDecoder(android.content.res.Resources resources,
int resourceId) |
RasterDecoder(android.content.res.Resources resources,
android.net.Uri uri) |
Modifier and Type | Method and Description |
---|---|
protected float |
calculateExactSample(float boundsWidth,
float boundsHeight,
boolean fitIntoBounds) |
protected MultiRect |
calculateImageSlice(android.graphics.RectF bounds,
android.graphics.RectF region) |
abstract android.graphics.Bitmap |
decodeAsBitmap(MultiRect slice,
int sampleSize) |
android.graphics.Bitmap |
getBitmap(int boundsWidth,
int boundsHeight,
boolean fitIntoBounds,
DrawableState state) |
android.graphics.Bitmap |
getBitmap(android.graphics.RectF bounds,
android.graphics.RectF region) |
boolean |
isVector() |
createCache, decodeSize, fallbackCrop, finalize, getDrawable, getInputStream, getInputStream, getResources, getSize, getUncachedInputStream, getUri, isStateful, recycle, resourceToUri
@AnyThread public RasterDecoder(@NonNull android.content.res.Resources resources, int resourceId)
@AnyThread public RasterDecoder(@NonNull android.content.res.Resources resources, @NonNull android.net.Uri uri)
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(int boundsWidth, int boundsHeight, boolean fitIntoBounds, @Nullable DrawableState state)
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(@NonNull android.graphics.RectF bounds, @NonNull android.graphics.RectF region)
@WorkerThread protected MultiRect calculateImageSlice(@NonNull android.graphics.RectF bounds, @NonNull android.graphics.RectF region)
@WorkerThread protected float calculateExactSample(float boundsWidth, float boundsHeight, boolean fitIntoBounds)
@Nullable @WorkerThread public abstract android.graphics.Bitmap decodeAsBitmap(@Nullable MultiRect slice, int sampleSize)