|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.siemens.mp.misc.NativeMem
com.siemens.mp.game.ExtendedImage
The ExtendedImage extends Image
properties with device-specific functionality.
ExtendedImage provides functionality for working with black/white and black/white/transparent images as bitmaps (access to individual pixel and to pixel arrays) and for drawing images directly on the handset display (without a paint() call).
Image
Constructor Summary | |
ExtendedImage(Image image)
Creates ExtendedImage object from an already existing standard Image .
|
Method Summary | |
void |
blitToScreen(int x,
int y)
Draws an image directly into the display buffer (without a paint call). |
void |
clear(byte color)
Fills an entire image with a given color. |
Image |
getImage()
Returns the standard Image
of ExtendedImage object.
|
int |
getPixel(int x,
int y)
Returns an individual pixel's color. |
void |
getPixelBytes(byte[] pixels,
int x,
int y,
int width,
int height)
Stores pixels' colors into the given bytearray. |
void |
setPixel(int x,
int y,
byte color)
Sets individual pixel's color. |
void |
setPixels(byte[] pixels,
int x,
int y,
int width,
int height)
Sets pixels' colors from a bytearray. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExtendedImage(Image image) throws IllegalArgumentException
Image
.
The Image
width must be a multiple of 8.
After ExtendedImage creation, the user may work with both the ExtendedImage
and the original Image
methods.
image
- standart Image
, the width must be a multiple of 8
IllegalArgumentException
- if the width of the image is not a multiple of 8getImage
Method Detail |
public void setPixel(int x, int y, byte color)
x
- the x coordinate of the pixely
- the y coordinate of the pixelcolor
- the color of the pixel getPixel
,
setPixels
public void setPixels(byte[] pixels, int x, int y, int width, int height)
pixels
- the pixel array (1 or 2 bit per pixel, depending on the image type used)x
- the x coordinate of the left-top rectangle corner, must be a multiple of 8y
- the y coordinate of the left-top rectangle cornerwidth
- the width of the rectangle, must be a multiple of 8height
- the height of the rectanglegetPixelBytes
,
setPixel
public int getPixel(int x, int y)
x
- the x coordinate of the pixely
- the y coordinate of the pixel
setPixel
,
getPixelBytes
public void getPixelBytes(byte[] pixels, int x, int y, int width, int height)
pixels
- the target pixel array (1 or 2 bit per pixel, depending on the image type)x
- the x coordinate of the left-top rectangle corner, must be a multiple of 8y
- the y coordinate of the left-top rectangle cornerwidth
- the width of the rectangle, must be a multiple of 8height
- the height of the rectanglesetPixels
,
getPixel
public void clear(byte color)
color
- the color to fill public void blitToScreen(int x, int y)
x
- the x coordinate of the drawing area starting point, in screen coordinatesy
- the y coordinate of the drawing area starting point, in screen coordinatespublic Image getImage()
Image
of ExtendedImage object.
Image
ExtendedImage constructor
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Generated on 2003-10-17 | For further information and updates, please visit Siemens mobile Developer Portal |