Nokia 7650 drawing color string problem

When i try to draw a string or character on Nokia 7650, i set the color of graphics, but the color of string and character is always black when i drawing. Is there other method to draw color string on an image on nokia 7650?
[231 byte] By [GaryWua] at [2007-9-28 6:46:40]
# 1

you will have better luck getting an accurate answer to this question on the Nokia forums. I don't have the url handy - but seeing as you have the 7650 emulator, I assume you already have the url.

from what I remember, the 7650 emulator has a bug in it regarding alpha channels. (though this was a long time ago (3months), and I would have thought it would have been fixed by now.

Anyhow, its a silly little bug, the AlphaChannel is interpretted inversely.

e.g.

0xFFFFFFFF is a totally transparent white

and 0x00FFFFFF is a totally opaque white

so, try changing the alpha component of the color, see if that fixes your problem.

e.g.

//g.setColor(0xFFFF0000);//red (should be opaque, but may not be)

g.setColor(0x00FF0000);//red (should be transparent, but may not be)

g.drawString("fred",0,0,Graphics.TOP|Graphics.LEFT);

Abusea at 2007-7-9 17:58:01 > top of Java-index,Other Topics,Java Game Development...
# 2

sorry, i make a mistake. The Graphics gets from Image object. It means that i draw strings on an image, then, i draw this image on Canvas. Even i change the color of Graphics, the color of the string is still black. does anyone know how to solve my problem? thanks a lot

And, the description in APIs: the high order byte of this value is ignored

so, i think that it is not the problem of the color value

Thanks

GaryWua at 2007-7-9 17:58:01 > top of Java-index,Other Topics,Java Game Development...
# 3
what Graphics object are you changing the color on?the 1 that you use to draw onto the image,or the 1 that you use to draw onto the screen?
Abusea at 2007-7-9 17:58:01 > top of Java-index,Other Topics,Java Game Development...
# 4

I change the Graphics object of an Image object. see the code.

Graphcis g = image.getGraphics();

g.setColor(0xff0000);

g.drawRect(10, 10, 10, 10);

g.drawString("string", 20, 20);

Well, it will draw a red rectangle and a black string

So, i think that is it the problem of Nokia 7650?

GaryWua at 2007-7-9 17:58:01 > top of Java-index,Other Topics,Java Game Development...
# 5
looks like it to me as well.its only the emulator - it prolly works just fine on the actual device :P (bad emulators - another problem that plagues the java mobile market)
Abusea at 2007-7-9 17:58:01 > top of Java-index,Other Topics,Java Game Development...