You Are Here:

Community: Developer Discussion Boards

#1 Old URGENT: the problem of setColor() in Nokia3650,7650? - 2002-12-02, 13:09

Join Date: Mar 2003
Posts: 50
xrsu
Offline
Regular Contributor
I use g.setColor(0x00FFFFFF) to drawString() the text in FullCanvas.
It workes well in old j2me version. But problem in new version, the text is still black. Actually the color

is always black, useless of the setColor(). What's the matter? Thanks for help.

the codes are like this:
Font textFont = Font.getFont(0,Font.STYLE_BOLD,Font.SIZE_SMALL);
offscrg.setFont(txtFont);
offscrg.setColor(0x00000000);
offscrg.drawString();
offscrg.setColor(0x00FFFFFF);
offscrg.drawString();
g.drawImage(offscrimg,getWidth()/2,getHeight()/2,Graphics.VCENTER|Graphics.HCENTER);
The version currently in 7650 is v4.39 30-10-02.
(I am sorry for my mistake information before.)
Reply With Quote

#2 Old 2003-03-20, 11:06

Join Date: Mar 2003
Posts: 13
paulkeast
Offline
Registered User
Hi,

Sorry, I have only just read this post.

I had the same problem with FW 4.69 on the 7650. It happened only when I used setColor() on the graphics context of an Image object. When setting the color of a Canvas objects graphical context, the text was coloured correctly.

My way around the problem was to render the Image as normal but any text that was required was rendered over the top after drawing the image - using setColor() and drawString() of the canvases context.

Hope that helps,

Paul Keast
Reply With Quote

#3 Old 2004-11-09, 16:50

Join Date: Nov 2004
Posts: 1
CharlieSkinner
Offline
Registered User
Thanks Paul. I don't know if you helped XRSU, but it certainly helps me.....I'm having the same issue with the NGage - the colours are fine in all the emus, but on hardware I get nothing but black. Your explanation adds up to code changes prior to losing colour. Just about to test it now..............
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia