public abstract class CanvasAdapter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static float |
dpi
The dpi.
|
static float |
scale
The scale.
|
static float |
textScale
The text scale.
|
| Constructor and Description |
|---|
CanvasAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected static Bitmap |
createBitmap(java.lang.String relativePathPrefix,
java.lang.String src) |
static Bitmap |
decodeBitmap(java.io.InputStream inputStream) |
protected abstract Bitmap |
decodeBitmapImpl(java.io.InputStream inputStream)
Create
Bitmap from InputStream. |
static Bitmap |
decodeSvgBitmap(java.io.InputStream inputStream) |
protected abstract Bitmap |
decodeSvgBitmapImpl(java.io.InputStream inputStream)
Create SVG
Bitmap from InputStream. |
static Bitmap |
getBitmapAsset(java.lang.String relativePathPrefix,
java.lang.String src) |
protected static void |
init(CanvasAdapter adapter) |
protected abstract Bitmap |
loadBitmapAssetImpl(java.lang.String relativePathPrefix,
java.lang.String src)
Create
Bitmap from bundled assets. |
static Bitmap |
newBitmap(int width,
int height,
int format) |
protected abstract Bitmap |
newBitmapImpl(int width,
int height,
int format)
Create
Bitmap with given dimensions. |
static Canvas |
newCanvas() |
protected abstract Canvas |
newCanvasImpl()
Create a Canvas.
|
static Paint |
newPaint() |
protected abstract Paint |
newPaintImpl()
Create Paint.
|
public static float dpi
public static float scale
public static float textScale
protected abstract Canvas newCanvasImpl()
public static Canvas newCanvas()
protected abstract Paint newPaintImpl()
public static Paint newPaint()
protected abstract Bitmap newBitmapImpl(int width, int height, int format)
Bitmap with given dimensions.width - the widthheight - the heightformat - the formatpublic static Bitmap newBitmap(int width, int height, int format)
protected abstract Bitmap decodeBitmapImpl(java.io.InputStream inputStream)
Bitmap from InputStream.inputStream - the input streampublic static Bitmap decodeBitmap(java.io.InputStream inputStream)
protected abstract Bitmap decodeSvgBitmapImpl(java.io.InputStream inputStream)
Bitmap from InputStream.inputStream - the input streampublic static Bitmap decodeSvgBitmap(java.io.InputStream inputStream)
protected abstract Bitmap loadBitmapAssetImpl(java.lang.String relativePathPrefix, java.lang.String src)
Bitmap from bundled assets.relativePathPrefix - the prefix for relative resource pathsrc - the resourcepublic static Bitmap getBitmapAsset(java.lang.String relativePathPrefix, java.lang.String src)
protected static Bitmap createBitmap(java.lang.String relativePathPrefix, java.lang.String src) throws java.io.IOException
java.io.IOExceptionprotected static void init(CanvasAdapter adapter)