Class ImageProvider
Package world.mappable.runtime.image
java.lang.Object
↳ world.mappable.runtime.image.ImageProvider
abstract class ImageProvider
Provides Bitmap objects from different input sources.
Extend this class to provide images from custom sources.
Summary
Constructors
|
Signature and Description |
|
ImageProvider(boolean cacheable) |
Methods
|
Type and modifiers |
Method and Description |
|
boolean |
isCacheable() |
|
|
getId() |
|
|
getImage() |
|
|
fromBitmap(android.graphics.Bitmap bitmap) |
|
|
fromBitmap(android.graphics.Bitmap bitmap, |
|
|
fromAsset(android.content.Context context, |
|
|
fromAsset(android.content.Context context, |
|
|
fromResource(android.content.Context context, |
|
|
fromResource(android.content.Context context, |
|
|
fromFile(java.lang.String fileName) |
|
|
fromFile(java.lang.String fileName, |
Constuctors
ImageProvider
|
ImageProvider() |
ImageProvider
|
ImageProvider(boolean cacheable) |
Methods
isCacheable
|
boolean isCacheable() |
Determines whether image should be cached on GPU or not.
getId
|
java.lang.String getId() |
Returns the unique identifier for an image.
Providers can be cached based on it.
getImage
|
android.graphics.Bitmap getImage() |
Returns the image in bitmap format.
fromBitmap
|
ImageProvider fromBitmap(android.graphics.Bitmap bitmap) |
fromBitmap
|
ImageProvider fromBitmap(android.graphics.Bitmap bitmap, |
Returns the image provider based on a given bitmap.
fromAsset
|
ImageProvider fromAsset(android.content.Context context, |
fromAsset
|
ImageProvider fromAsset(android.content.Context context, |
Returns the image provider based on a given asset (from the assets/ folder).
fromResource
|
ImageProvider fromResource(android.content.Context context, |
fromResource
|
ImageProvider fromResource(android.content.Context context, |
Returns the image provider based on an application resource (from the res/ folder).
fromFile
|
ImageProvider fromFile(java.lang.String fileName) |
fromFile
|
ImageProvider fromFile(java.lang.String fileName, |
Returns the image provider based on an image file from the internal storage.