You Are Here:

Community: Developer Discussion Boards

#1 Old Fadig effect - 2003-10-03, 13:15

Join Date: Oct 2003
Posts: 2
dpoldo
Offline
Registered User
Hi, I'm attempting to resolve a problem for a series 60 device.
I would like to draw a string with a fading effect (i.e., alpha from 0 to 100...or 255?!), but the effect should be applied to one character of a string at a time.
I have tried to combine the drawString(...) method with the setARGBColor method, but nothing happened. What can I do?
Thanx
Reply With Quote

#2 Old 2003-10-04, 15:00

Join Date: Sep 2003
Posts: 12
Location: Montreal
Ralpharama
Offline
Registered User
What about using setColor(r, g, b) before using drawString to draw each character in turn, incrementing the values as you do so? You could set up a loop to draw the chars, passing the colours to a routine, say, like:

for (int i=0; i<s.length(); i++) {
drawMyChar(r, g, b, s, i)
[do colour change]
}

drawMyChar(int r, int g, int b, String s, int stringPos) {
g.setColor(r,g,b);
g.drawString(s.subString(stringPos, stringPos), x, y, 0);
}

Or something like that? You'd have to pass the x and y position too and increment the x with each char I guess.
Anyway, just a thought.
Reply With Quote

#3 Old 2003-10-04, 15:36

Join Date: Oct 2003
Posts: 2
dpoldo
Offline
Registered User
Uhm, it seems a good idea...
I'll try, thanx
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 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ