Discussion Board

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

    7650 font color problems non-display buffer images.


    I am rendering text to an offscreen Image buffer which is later drawn to the main canvas. This works fine for all Nokia handsets with the exception of the 7650, which appears to ignore 'setColor' when invoked on a graphics contexts which is not associated with the main display. The text is rendered, but only in black.

    For example,

    public void paint( Graphics hDC )
    // Attempt to render some text into a new image.
    Image img = Image.createImage( 100,100 );
    Graphics hdl = img.getGraphics();
    hdl.setColor( 0 );
    hdl.fillRect( 0,0,100,100 );
    hdl.setColor( 0xff0000 );
    hdl.drawString( "Some text",0,img.getHeight()/2,Graphics.TOP|Graphics.LEFT );

    // Render the image to the main display.
    hDC.drawImage( img,getWidth()/2,getHeight()/2,Graphics.HCENTER | Graphics.VCENTER );

    The text you would expect to be rendered in red, is in fact rendered correctly using the Series 60 emulator and in black on the hardware, making the text invisible due to the black background.

    I've attemped to use the Nokia DirectUtils/Graphics extensions to see if there maybe a workaround using 'setColor' with ARGB options, this yielded the same results.

    Any help much appreciated.


  2. #2
    Registered User
    Join Date
    Mar 2003

    RE: 7650 font color problems non-display buffer images.

    Yep, as stated above, the 4.39 "upgrade" causes the problem. Yet, as I posted before, Nokia are still offering the upgrade, despite this. Great huh? You'll also notice that if you attempt to draw too many clipped images within the paint() method of a canvas, some may not be clipped at all, which will result in a mess on the screen. This happens even if you use a synchronised block to enforce the clipping.

Posting Permissions

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