public interface MicroUIImage
This interface is used by several drawing methods which use an image as source image. It can be mapped on byte array given as parameter in some MicroUI natives. This byte array is retrieved in MicroEJ application using the method Image.getSNIContext().
| Modifier and Type | Method and Description |
|---|---|
MicroUIImageFormat |
getFormat()
Returns the MicroUI Image format.
|
int |
getHeight()
Returns the MicroUI Image height.
|
int |
getIdentifier()
Returns an unique identifier for the image.
|
ej.fp.Image |
getImage()
Returns the front panel image allocated for the MicroUI Image.
|
ej.fp.Image |
getImage(int color)
Returns the front panel image allocated for the MicroUI Image, applying a rendering color.
|
int |
getWidth()
Returns the MicroUI Image width.
|
boolean |
isClosed()
Returns true when the image has been closed by the MicroEJ application.
|
boolean |
isLCD()
Returns true when the image targets the LCD.
|
boolean |
isMutable()
Tells whether the MicroUI Image is a mutable image or not.
|
int |
readPixel(int x,
int y)
Returns the 32-bit ARGB color format (A-R-G-B) of a pixel.
|
boolean |
requestReading()
Requests a reading on the graphics context.
|
int getIdentifier()
The identifier is reserved for this image until it is closed. It can be assimilated to the image buffer address (see LLUI_DISPLAY_getBufferAddress() on emb side).
int getWidth()
int getHeight()
MicroUIImageFormat getFormat()
ej.fp.Image getImage()
ej.fp.Image getImage(int color)
MicroUIImageFormat.MICROUI_IMAGE_FORMAT_A8,
MicroUIImageFormat.MICROUI_IMAGE_FORMAT_A4, MicroUIImageFormat.MICROUI_IMAGE_FORMAT_A2 or
MicroUIImageFormat.MICROUI_IMAGE_FORMAT_A1.
Next calls to getImage() (in same native function) will return the same image with same rendering color
until next call to getImage(int).
For all other formats, the color is ignored and this call is equivalent than calling getImage().color - the color to apply on Ax image in 0xRRGGBB format (the alpha component is ignored).boolean isLCD()
boolean isClosed()
boolean isMutable()
MicroUIGraphicsContext.LLUIDisplay.mapMicroUIGraphicsContext(byte[])int readPixel(int x,
int y)
x - the x coordinate of the pixel.y - the y coordinate of the pixel.boolean requestReading()