Hi there,
I'm using the following code to create an alert to display on the Nokia S40 emulator I use :
_image = Image.createImage("/mylogo.PNG");
_alert = new Alert("RFID online","",_image,AlertType.INFO);
but the image is drawn mosty out of the screen : only its bottom left part is displayed in the right top corner of the screen.
I tried to copy this immutable image in a mutable one, using this code :
Image copy = Image.createImage(_image.getWidth(), _image.getHeight());
Graphics g = copy.getGraphics();
g.drawImage(_image, 0, 0, Graphics.TOP|Graphics.LEFT);
with several different values for the drawImage() method, but the only thing i could do was changing the part of the original image displayed in the right top corner of the S40 screen.
I could not find any method in the classes Image or Alert to draw the Image at the right place...
Any idea someone ?
Cheers,
Romain

Reply With Quote


