Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User asif79's Avatar
    Join Date
    Oct 2003
    Location
    Bangladesh
    Posts
    41
    how can i create a transparent mutable image??

  2. #2
    Super Contributor shmoove's Avatar
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    The Nokia UI way:
    Code:
    Image im = DirectUtils.createImage(WIDTH,HEIGHT,0);
    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);
    In standard MIDP 1.0 there is no way.

    shmoove

  3. #3
    Registered User asif79's Avatar
    Join Date
    Oct 2003
    Location
    Bangladesh
    Posts
    41
    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.

  4. #4
    Super Contributor shmoove's Avatar
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Once you created the image as a transparent image, you can use the regular graphics (MIDP 1.0).

    shmoove

  5. #5
    Registered User asif79's Avatar
    Join Date
    Oct 2003
    Location
    Bangladesh
    Posts
    41
    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??

  6. #6
    Super Contributor shmoove's Avatar
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved