Hi,
I have a simple menu that contains an image in the background:
public class Menus extends Canvas implements Runnable{
public Menus(){
try {
splash = Image.createImage("/splash.png");
}
catch (IOException e) {e.printStackTrace();}
setFullScreenMode(true);
screenW = getWidth();
screenH = getHeight();
new Thread(this).start();
}
protected void paint(Graphics g) {
g.fillRect(0,0,screenW, screenH);
// paint splash image
g.drawImage(splash, screenW/2, screenH/2, Graphics.HCENTER|Graphics.VCENTER);
...etc etc
}
Now, on the default WTK 2.0 emulator this draws a black fill with my splash image nicely centered. But on the Nokia Series 60 2.0 emulator and also on my Nokia 6600, it draws it quite wrong. The fillrect does not fill the screen all the way to the bottom, and the splash image gets centered CORRECTLY in the HORIZONTAL, but is painted too high up in the VERTICAL.
Is anyone aware of an issue with MIDP 2.0 method setFullScreenMode(true) ? does it not properly change the values of getWidth() and getHeight() ?
thanks in advance,
DK

Reply With Quote

