You Are Here:

Community: Developer Discussion Boards

#1 Old drawPixels problem (3650) - 2003-07-24, 17:26

Join Date: Jul 2003
Posts: 4
romzatxxx
Offline
Registered User
Does anybody know how can i get pixels displayed on the screen
drawPixels doesn't do anything is something wrong with my code.

mutImage = DirectUtils.createImage( fadeAreaWidth, fadeAreaHeight, 0 );

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

dg.drawImage(image, 0, 0, Graphics.TOP|Graphics.LEFT, 0);

int[] pixels = new int[fadeAreaWidth * fadeAreaHeight];

dg.getPixels(pixels, 0, fadeAreaWidth, 0, 0, fadeAreaWidth, fadeAreaHeight, DirectGraphics.TYPE_INT_8888_ARGB);

dg.drawPixels( pixels, true, 0, fadeAreaWidth, 0, 0, fadeAreaWidth, fadeAreaHeight, 0, DirectGraphics.TYPE_INT_8888_ARGB);
Last edited by romzatxxx : 2003-07-24 at 17:36.
Reply With Quote

#2 Old 2003-07-24, 17:40

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
Check current clip and try setting trancparency argument to false
Reply With Quote

#3 Old 2003-07-24, 17:41

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
P.S.
Check some pixels in resulting array. Maybe problem is not in drawPixels, but earlier
Reply With Quote

#4 Old 2003-07-24, 17:57

Join Date: Jul 2003
Posts: 4
romzatxxx
Offline
Registered User
I know that pixels are fine.
I tryied something like this

g.setClip(0,0,fadeAreaWidth,fadeAreaHeight);

dg.drawPixels( pixels, false, 0, fadeAreaWidth, 20, 20, fadeAreaWidth, fadeAreaHeight, 0, DirectGraphics.TYPE_INT_8888_ARGB);

its still shooting blanks.
Reply With Quote

#5 Old 2003-07-25, 10:14

Join Date: Mar 2003
Posts: 31
Location: Denmark
pekkert
Offline
Registered User
why dosent it works, i mean you are drawing on the image you got the pixels from , so visual you wont see the effect.

have you run the array to see if it contains anything.

if everything is ok then try using TYPE_INT_4444_ARGB
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