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.
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.