It works as it is in my 7650, but I got to test engage
and updated 7650, and there was a problem:
Texts in menu's were always written in black. I start
to scale color from (255 -x, 255 -x, 255 -x) downwards to
(255 -x -n, 255 -x -n, 255 -x -n), from white to black, but texts
are always written in black. This was apparent as
background lightning is drawn, the texts were visible on
top of it. So basically you can see the red lines no text,
and when lightning strikes, you can see outlines of black
You should be able to replicate this by setting color to
something like (200, 200, 200) and drawing text. The
text should be gray, but if the bug is replicated, it will
be drawn in black.
The other possibility is that this happens in conjunction
with some of my other code. Still, the code works in applet,
application, sun emulator and in old 7650. Shouldn't it
work in updated 7650's and Engage too?
I found this bug too, on Nokia7650. But, it seems that apear just when I draw in an another image (g = img.getGraphics()). If I use the Graphics object passed as parameter in paint() the drawString uses the right color seted before.
Another bug related to set color is that function fillRect (and probably drawRect, drawLine, fillArc, etc) do not care about alpha from color seted with setARGBColor()
The follwing code
DirectGraphics dg = DirectUtils.getDirectGraphics(g);
g.fillRect(x, y, w, h);
doesn't fill the rect with alpha. Just draw an opaque green rect.
Workaround: I use fillPolygon() instead, to fill a rect in a color with alpha.
I work right now for a game on 7650 and I'm disappointed of drawPixels(): it seems to be slower than drawImage(). Does have anybody any ideea why ? On other phones is quite fast (see 3510i for example).
I was also using another image on which I was drawing first.
Ill try to draw texts directly on graphics device given by the
VM then. Hopefully this works, if it does, Ill get to make my
demo release on phones this week. Workaround should be easy
I have a Nokia 7650 bought over a year ago, and indeed the
problem did not show on it. But it does show on newer phones.