You Are Here:

Community: Developer Discussion Boards

#1 Old Transparency question - 2004-01-27, 12:19

Join Date: Jan 2004
Posts: 10
Vyts
Offline
Registered User
Hello,

I am using this code:

Image offscr = Image.createImage(src.getWidth(), src.getHeight());

DirectGraphics dg = DirectUtils.getDirectGraphics(offscr.getGraphics());

dg.drawImage(src, 0, 0, Graphics.TOP | Graphics.LEFT, DirectGraphics.FLIP_HORIZONTAL);

to flip my images loaded from resource. But I encounter transparency problem, that is, my png images have defined transparency color, and drawing this image with standard Graphics.drawImage draws them transparently. However, after flipping and blitting produced offscreen image to screen transparency is not taken into account. Any ideas?

Thanks,

Vytautas
Reply With Quote

#2 Old 2004-01-27, 12:32

Join Date: Jan 2004
Posts: 10
Vyts
Offline
Registered User
Solved, just had to use DirectUtils.createImage(int,int,ARGB)
Reply With Quote

#3 Old 2004-01-29, 10:58

Join Date: Mar 2003
Posts: 118
Location: Rotterdam, Holland
remonvv
Offline
Regular Contributor
yes, there is NO way to do this in standard MIDP 1.0, mutable images cannot be transparent. I understand you're writing nokia specific code, so it's not really an issue..
Reply With Quote

#4 Old Re: Transparency question - 2006-05-30, 23:59

Join Date: May 2006
Posts: 8
fredrischter
Offline
Registered User
sorry, but i can't use this, i don't know how are you using the DirectUtil.createImage... can you show me a example? please
Reply With Quote

#5 Old Re: Transparency question - 2006-05-31, 19:49

Join Date: Mar 2006
Posts: 518
wang_shui
Offline
Super Contributor
hope this is an helpful link
http://discussion.forum.nokia.com/fo...ad.php?t=38125

Wang
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: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X 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