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

Reply With Quote

