×

Discussion Board

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

    Possible clipping bug on 7650 v4.39

    Clipping does not appear to be working properly on off screen images under firmware v4.39 on the 7650.

    I have the following paint() method from a test program:

    protected void paint(Graphics g) {
    Graphics bufg = buf.getGraphics();
    bufg.setColor(64, 64, 64);
    bufg.fillRect(0, 0, getWidth(), getHeight());

    bufg.setClip(0, 0, getWidth(), getHeight());
    bufg.drawImage(myMidlet.img, 100, 0, Graphics.TOP|Graphics.LEFT);

    bufg.setClip(0, 0, 36, 36);
    bufg.drawImage(myMidlet.img, 0, 0, Graphics.TOP|Graphics.LEFT);

    g.drawImage(buf, 0, 0, Graphics.TOP|Graphics.LEFT);
    }

    myMidlet.img is 36x324 animation strip. This example functions as expected and draws a single animation frame at (0, 0) and the whole animation strip at (100, 0).

    However if you change the way the second image is draw to:

    DirectUtils.getDirectGraphics(bufg).drawImage(myMidlet.img, 0, 0, Graphics.TOP|Graphics.LEFT, 0);

    Then the clipping information seems to be ignored and the whole animation strip is drawn at (0, 0) as well as (100, 0).

    Note that if you draw directly to the screen graphics object g then the example works as expected.

    Note also that this has only started happening under firmware v4.39. I had no such problems under v3.12

    John Barker
    Warthog Ltd

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Silicon Scally
    Posts
    69

    RE: Possible clipping bug on 7650 v4.39

    The clipping bug has been mentioned by quite a few people, so you're not alone on this one (same goes for your post regarding drawing text).

    Regards,

    Carl.

Posting Permissions

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