public abstract class ImageBase
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
byte[][] |
cache_cell_info |
boolean[] |
cache_cell_saved_separately |
int[] |
cache_dimensions |
javax.microedition.lcdui.Image[][] |
cache_images |
int[] |
cache_source_ids
The cache of images
|
static int |
DRAWIMAGETRANSFORM_HMIRROR
The 8 basic rotation/flip transformations - order determined by variable name (rotations happen before the horizontal mirroring)
|
static int |
DRAWIMAGETRANSFORM_HMIRROR_ROTCCW180
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_HMIRROR_ROTCCW270
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_HMIRROR_ROTCCW90
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_HMIRROR_ROTCW180
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_HMIRROR_ROTCW270
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_HMIRROR_ROTCW90
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_NONE
The 8 basic rotation/flip transformations - order determined by variable name (rotations happen before the horizontal mirroring)
|
static int |
DRAWIMAGETRANSFORM_ROTCCW180
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCCW180_HMIRROR
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCCW180_VFLIP
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCCW270
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCCW270_HMIRROR
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCCW270_VFLIP
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCCW90
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCCW90_HMIRROR
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCCW90_VFLIP
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCW180
The 8 basic rotation/flip transformations - order determined by variable name (rotations happen before the horizontal mirroring)
|
static int |
DRAWIMAGETRANSFORM_ROTCW180_HMIRROR
The 8 basic rotation/flip transformations - order determined by variable name (rotations happen before the horizontal mirroring)
|
static int |
DRAWIMAGETRANSFORM_ROTCW180_VFLIP
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCW270
The 8 basic rotation/flip transformations - order determined by variable name (rotations happen before the horizontal mirroring)
|
static int |
DRAWIMAGETRANSFORM_ROTCW270_HMIRROR
The 8 basic rotation/flip transformations - order determined by variable name (rotations happen before the horizontal mirroring)
|
static int |
DRAWIMAGETRANSFORM_ROTCW270_VFLIP
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_ROTCW90
The 8 basic rotation/flip transformations - order determined by variable name (rotations happen before the horizontal mirroring)
|
static int |
DRAWIMAGETRANSFORM_ROTCW90_HMIRROR
The 8 basic rotation/flip transformations - order determined by variable name (rotations happen before the horizontal mirroring)
|
static int |
DRAWIMAGETRANSFORM_ROTCW90_VFLIP
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_VFLIP
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_VFLIP_ROTCCW180
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_VFLIP_ROTCCW270
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_VFLIP_ROTCCW90
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_VFLIP_ROTCW180
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_VFLIP_ROTCW270
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
DRAWIMAGETRANSFORM_VFLIP_ROTCW90
Transformation equivalents, to ease coding readability - especially when MIDP2 and NokiaUI apply flips and transforms differently!
|
static int |
IMAGEDIMENSION_CELL_CROPPED_HEIGHT
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEDIMENSION_CELL_CROPPED_TL_X
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEDIMENSION_CELL_CROPPED_TL_Y
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEDIMENSION_CELL_CROPPED_WIDTH
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEDIMENSION_CELL_HEIGHT
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEDIMENSION_CELL_WIDTH
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEDIMENSION_HEIGHT
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEDIMENSION_NUM_CELLS_HIGH
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEDIMENSION_NUM_CELLS_WIDE
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEDIMENSION_WIDTH
The various dimensional, cell, and cell-cropping info that can be queried about a particular image / transformation.
|
static int |
IMAGEFORMAT_CONTAINSCELLINFO |
static int |
IMAGEFORMAT_ENCODEDPIXELDATA_NOPALETTE
The image formats exported from the ResHandler
|
static int |
IMAGEFORMAT_FULLCOLOUR |
static int |
IMAGEFORMAT_NONRLE_ENCODED |
static int |
IMAGEFORMAT_RAWPNG
The image formats exported from the ResHandler
|
static int |
IMAGEFORMAT_RAWPNG_NOPALETTE
The image formats exported from the ResHandler
|
static int |
IMAGEFORMAT_RLE_ENCODED |
static int |
LOADIMAGETRANSFORM_HMIRROR
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_HMIRROR_ROTCCW180
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_HMIRROR_ROTCCW270
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_HMIRROR_ROTCCW90
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_HMIRROR_ROTCW180
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_HMIRROR_ROTCW270
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_HMIRROR_ROTCW90
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_NONE
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCCW180
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCCW180_HMIRROR
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCCW180_VFLIP
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCCW270
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCCW270_HMIRROR
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCCW270_VFLIP
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCCW90
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCCW90_HMIRROR
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCCW90_VFLIP
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCW180
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCW180_HMIRROR
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCW180_VFLIP
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCW270
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCW270_HMIRROR
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCW270_VFLIP
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCW90
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCW90_HMIRROR
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_ROTCW90_VFLIP
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_VFLIP
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_VFLIP_ROTCCW180
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_VFLIP_ROTCCW270
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_VFLIP_ROTCCW90
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_VFLIP_ROTCW180
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_VFLIP_ROTCW270
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
static int |
LOADIMAGETRANSFORM_VFLIP_ROTCW90
Transformation bitflags used for loading purposes so they can be bitwise-anded together
|
Constructor and Description |
---|
ImageBase() |
Modifier and Type | Method and Description |
---|---|
byte[] |
decodeImage(byte[] src_data,
int index,
int width,
int height)
Decodes an image from a propietary format.
|
byte[] |
decodeImage(byte[] src_data,
int index,
int width,
int height,
int num_palette_entries)
Decodes an image from a propietary format.
|
void |
drawImageID(javax.microedition.lcdui.Graphics g,
int cache_id,
int cell,
int draw_transform,
int x,
int y,
int anchor)
Draws a cached image
|
void |
drawImageIDNoTransform(javax.microedition.lcdui.Graphics g,
int cache_id,
int cell,
int x,
int y,
int anchor)
Draws a cached image.
|
javax.microedition.lcdui.Image |
getImage(int img_id)
Loads a single image (no transfomration) and returns the image itself, not an ID
|
javax.microedition.lcdui.Image |
getImage(int img_id,
int palette_id,
int draw_transform)
Loads a single image (one transformation is supplied) and returns the image for that one transformation itself, not an ID.
|
javax.microedition.lcdui.Image |
getImage(int img_id,
int base_palette_id,
int override_palette_id,
int draw_transform)
Loads a single image (one transformation is supplied) and returns the image for that one transformation itself, not an ID.
|
int |
getImageDimension(int cache_id,
int cell,
int draw_transform,
int dimension)
Returns the appropriate dimension for a particular cached image / cell / transformation
|
int |
loadImageID(int img_id,
int palette_id,
int load_transforms,
boolean split_cells)
Loads a specified image into a number of transformations, returning its internal cache ID.
|
int |
loadImageID(int img_id,
int base_palette_id,
int override_palette_id,
int load_transforms,
boolean split_cells)
Loads a specified image into a number of transformations, returning its internal cache ID Use this ID in further method calls.
|
void |
unloadImageID(int cache_id)
Will unload the specified cached image and all of its transformed images and cells
|
public static final int IMAGEFORMAT_RAWPNG
public static final int IMAGEFORMAT_RAWPNG_NOPALETTE
public static final int IMAGEFORMAT_ENCODEDPIXELDATA_NOPALETTE
public static final int IMAGEFORMAT_FULLCOLOUR
public static final int IMAGEFORMAT_CONTAINSCELLINFO
public static final int IMAGEFORMAT_RLE_ENCODED
public static final int IMAGEFORMAT_NONRLE_ENCODED
public static final int IMAGEDIMENSION_WIDTH
public static final int IMAGEDIMENSION_HEIGHT
public static final int IMAGEDIMENSION_NUM_CELLS_WIDE
public static final int IMAGEDIMENSION_NUM_CELLS_HIGH
public static final int IMAGEDIMENSION_CELL_WIDTH
public static final int IMAGEDIMENSION_CELL_HEIGHT
public static final int IMAGEDIMENSION_CELL_CROPPED_WIDTH
public static final int IMAGEDIMENSION_CELL_CROPPED_HEIGHT
public static final int IMAGEDIMENSION_CELL_CROPPED_TL_X
public static final int IMAGEDIMENSION_CELL_CROPPED_TL_Y
public static final int DRAWIMAGETRANSFORM_NONE
public static final int DRAWIMAGETRANSFORM_ROTCW90
public static final int DRAWIMAGETRANSFORM_ROTCW180
public static final int DRAWIMAGETRANSFORM_ROTCW270
public static final int DRAWIMAGETRANSFORM_HMIRROR
public static final int DRAWIMAGETRANSFORM_ROTCW90_HMIRROR
public static final int DRAWIMAGETRANSFORM_ROTCW180_HMIRROR
public static final int DRAWIMAGETRANSFORM_ROTCW270_HMIRROR
public static final int DRAWIMAGETRANSFORM_VFLIP
public static final int DRAWIMAGETRANSFORM_ROTCW90_VFLIP
public static final int DRAWIMAGETRANSFORM_ROTCW180_VFLIP
public static final int DRAWIMAGETRANSFORM_ROTCW270_VFLIP
public static final int DRAWIMAGETRANSFORM_HMIRROR_ROTCW90
public static final int DRAWIMAGETRANSFORM_HMIRROR_ROTCW180
public static final int DRAWIMAGETRANSFORM_HMIRROR_ROTCW270
public static final int DRAWIMAGETRANSFORM_VFLIP_ROTCW90
public static final int DRAWIMAGETRANSFORM_VFLIP_ROTCW180
public static final int DRAWIMAGETRANSFORM_VFLIP_ROTCW270
public static final int DRAWIMAGETRANSFORM_ROTCCW90
public static final int DRAWIMAGETRANSFORM_ROTCCW180
public static final int DRAWIMAGETRANSFORM_ROTCCW270
public static final int DRAWIMAGETRANSFORM_ROTCCW90_HMIRROR
public static final int DRAWIMAGETRANSFORM_ROTCCW180_HMIRROR
public static final int DRAWIMAGETRANSFORM_ROTCCW270_HMIRROR
public static final int DRAWIMAGETRANSFORM_ROTCCW90_VFLIP
public static final int DRAWIMAGETRANSFORM_ROTCCW180_VFLIP
public static final int DRAWIMAGETRANSFORM_ROTCCW270_VFLIP
public static final int DRAWIMAGETRANSFORM_HMIRROR_ROTCCW90
public static final int DRAWIMAGETRANSFORM_HMIRROR_ROTCCW180
public static final int DRAWIMAGETRANSFORM_HMIRROR_ROTCCW270
public static final int DRAWIMAGETRANSFORM_VFLIP_ROTCCW90
public static final int DRAWIMAGETRANSFORM_VFLIP_ROTCCW180
public static final int DRAWIMAGETRANSFORM_VFLIP_ROTCCW270
public static final int LOADIMAGETRANSFORM_NONE
public static final int LOADIMAGETRANSFORM_ROTCW90
public static final int LOADIMAGETRANSFORM_ROTCW180
public static final int LOADIMAGETRANSFORM_ROTCW270
public static final int LOADIMAGETRANSFORM_HMIRROR
public static final int LOADIMAGETRANSFORM_ROTCW90_HMIRROR
public static final int LOADIMAGETRANSFORM_ROTCW180_HMIRROR
public static final int LOADIMAGETRANSFORM_ROTCW270_HMIRROR
public static final int LOADIMAGETRANSFORM_VFLIP
public static final int LOADIMAGETRANSFORM_ROTCW90_VFLIP
public static final int LOADIMAGETRANSFORM_ROTCW180_VFLIP
public static final int LOADIMAGETRANSFORM_ROTCW270_VFLIP
public static final int LOADIMAGETRANSFORM_HMIRROR_ROTCW90
public static final int LOADIMAGETRANSFORM_HMIRROR_ROTCW180
public static final int LOADIMAGETRANSFORM_HMIRROR_ROTCW270
public static final int LOADIMAGETRANSFORM_VFLIP_ROTCW90
public static final int LOADIMAGETRANSFORM_VFLIP_ROTCW180
public static final int LOADIMAGETRANSFORM_VFLIP_ROTCW270
public static final int LOADIMAGETRANSFORM_ROTCCW90
public static final int LOADIMAGETRANSFORM_ROTCCW180
public static final int LOADIMAGETRANSFORM_ROTCCW270
public static final int LOADIMAGETRANSFORM_ROTCCW90_HMIRROR
public static final int LOADIMAGETRANSFORM_ROTCCW180_HMIRROR
public static final int LOADIMAGETRANSFORM_ROTCCW270_HMIRROR
public static final int LOADIMAGETRANSFORM_ROTCCW90_VFLIP
public static final int LOADIMAGETRANSFORM_ROTCCW180_VFLIP
public static final int LOADIMAGETRANSFORM_ROTCCW270_VFLIP
public static final int LOADIMAGETRANSFORM_HMIRROR_ROTCCW90
public static final int LOADIMAGETRANSFORM_HMIRROR_ROTCCW180
public static final int LOADIMAGETRANSFORM_HMIRROR_ROTCCW270
public static final int LOADIMAGETRANSFORM_VFLIP_ROTCCW90
public static final int LOADIMAGETRANSFORM_VFLIP_ROTCCW180
public static final int LOADIMAGETRANSFORM_VFLIP_ROTCCW270
public int[] cache_source_ids
public int[] cache_dimensions
public javax.microedition.lcdui.Image[][] cache_images
public byte[][] cache_cell_info
public boolean[] cache_cell_saved_separately
public byte[] decodeImage(byte[] src_data, int index, int width, int height)
public byte[] decodeImage(byte[] src_data, int index, int width, int height, int num_palette_entries)
public javax.microedition.lcdui.Image getImage(int img_id, int palette_id, int draw_transform)
img_id
- The resource id of the imagepalette_id
- The resource id of the palette to use (or -1 to use the default one)draw_transform
- One of the DRAWIMAGETRANSFORM_ valuespublic javax.microedition.lcdui.Image getImage(int img_id, int base_palette_id, int override_palette_id, int draw_transform)
img_id
- The resource id of the imagebase_palette_id
- The resource id of the base palette to use (or -1 to use the default one)override_palette_id
- The resource id of the override palette to use (or -1 to use the default one)draw_transform
- One of the DRAWIMAGETRANSFORM_ valuespublic javax.microedition.lcdui.Image getImage(int img_id)
public int loadImageID(int img_id, int palette_id, int load_transforms, boolean split_cells)
img_id
- The resource id of the imagepalette_id
- The resource id of the palette to use (or -1 to use the default one)load_transforms
- The LOADIMAGETRANSFORM_ values that will be used in the futuresplit_cells
- Whether an image that's made of multiple cells should store them as individual imagespublic int loadImageID(int img_id, int base_palette_id, int override_palette_id, int load_transforms, boolean split_cells)
img_id
- The resource id of the imagebase_palette_id
- The resource id of the base palette to use (or -1 to use the default one)override_palette_id
- The resource id of the override palette to use (or -1 to use the default one)load_transforms
- The LOADIMAGETRANSFORM_ values that will be used in the futuresplit_cells
- Whether an image that's made of multiple cells should store them as individual imagespublic void drawImageID(javax.microedition.lcdui.Graphics g, int cache_id, int cell, int draw_transform, int x, int y, int anchor)
g
- The Graphics context to draw tocache_id
- ID returned from a previous loadImageID callcell
- Number of the cell to usedraw_transform
- The DRAWIMAGETRANSFORM_ flag to usex
- Xy
- Yanchor
- Graphical anchorpublic void drawImageIDNoTransform(javax.microedition.lcdui.Graphics g, int cache_id, int cell, int x, int y, int anchor)
g
- The Graphics context to draw tocache_id
- ID returned from a previous loadImageID callcell
- Number of the cell to usex
- Xy
- Yanchor
- Graphical anchorpublic void unloadImageID(int cache_id)
public int getImageDimension(int cache_id, int cell, int draw_transform, int dimension)
cache_id
- The cached id of the imagecell
- The id of the subcell in the imagedraw_transform
- The DRAWIMAGETRANSFORM_ to be referenceddimension
- The IMAGEDIMENSION_ we're querying