how can i create a transparent mutable image??
Printable View
how can i create a transparent mutable image??
The Nokia UI way:
[code]
Image im = DirectUtils.createImage(WIDTH,HEIGHT,0);
[/code]
The MIDP 2.0 way:
[code]
int[] pixels = new int[WIDTH * HEIGHT];
for (int i = WIDTH * HEIGHT - 1; i >= 0; i--)
pixels[i] = 0;
Image im = Image.createRGBImage(pixels,WIDTH,HEIGHT,true);
[/code]
In standard MIDP 1.0 there is no way.
shmoove
thanks,
but when drawing which Graphics object to use?
the normal g, or the NokiaUI g?
what i am trying to do is that ,
i want to draw two mutable images on the screen,
the background will scroll slower than the foreground, and the foreground should be transparent.
thanks again.
Once you created the image as a transparent image, you can use the regular graphics (MIDP 1.0).
shmoove
i want to draw two mutable images on the screen,
the background will scroll slower than the foreground, and the foreground should be transparent.
but the foreground doesnt stay transparent.
i did it with the nokia ui.
what do u suggest??
It should work with the regular Graphics object.
Maybe if you post the relevant code (how do you create the image, and how you paint it)....
shmoove