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