×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    34

    Getgraphics and paint

    Hello everyone,
    I have a problem with Graphics. When I paint stuff on a graphic
    and then display it there is no problem.
    However when I init then paint then update again, the changes don t show in Nokia6600 (works well in other phones and simulator)

    here is what i do :

    Image background;
    Graphics g1;

    void init()
    {
    background = Image.createImage(Width, Height);
    g1 = background.getGraphics();
    paintStuffOnGraphics(g1);
    }

    void update()
    {
    paintStuffOngraphics(g1);
    }

    void paint(Graphics g)
    {
    g.drawImage( background, X, Y, Graphics.TOP | Graphics.LEFT)
    }


    any idea of what I am doing wrong?
    in fact I am trying to work around the S60 createImage bug but without success so far.

    thank you...

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Are you calling repaint() anywhere after you call update()?

    shmoove

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    34
    Yes of course
    actually the paint method is called every 50ms

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    34
    (repaint is also called every 50ms)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×