You Are Here:

Community: Developer Discussion Boards

#1 Old question regarding painting mechanism - 2009-03-09, 09:02

Join Date: Jul 2005
Posts: 29
rosenholzer
Offline
Registered User
Hi !

I have a problem regarding updating the screen correctly.

I have written an application which changes a fullscreen main-canvas frequently. Between two redraw cycles i display another canvas with setCurrent().

The problem (or interesting effect) now is, that after i re-set the modified main-canvas with setCurrent() , the canvas is painted in the old state first. Here is to say, that my drawing layouting is done in the paint() method and some time elapses here.

What i want to know now: Why is this so ?
Why is my Canvas painted out to the display before the paint() method has been invoked ?
I have no chance to paint out, even a buffered image, because the platform copies some internal buffer out to the screen before i have the chance to draw on it.

I thought about using serviceRepaints(). But even if i use this, System would render out the internal buffer first.

So my question is:

Is it possible that the underlying platform copies the internal buffer of canvas out to the screen (triggered by setCurrent() without invoking paint() before ?

Yes, the answer would be know: thats the sense of buffering. But then i would like to know, what triggers my internal
buffer to be drawn out. So far i thought a repaint() triggers a paint() to be invoked and then the buffer is rendered out. But somehow the buffer seems to be rendered out more often, independent of invocation of paint().

Maybe somebody has some documentation for the internal mechanism of painting.

regards

Michael
Reply With Quote

#2 Old Re: question regarding painting mechanism - 2009-03-09, 09:18

Join Date: Jun 2007
Posts: 534
Location: Mumbai
Send a message via Yahoo to prakash.raman
prakash.raman's Avatar
prakash.raman
Offline
Super Contributor
Hi Michael, There is nothing as such internal buffer in paint mechanism. And if u are using same canvas instance u dont have to call setCurrent() again and again, just call repaint(). And when ur paint() is called change ur draw states.


au revoir
Prakash Raman
Reply With Quote

#3 Old Re: question regarding painting mechanism - 2009-03-09, 10:12

Join Date: Jul 2005
Posts: 29
rosenholzer
Offline
Registered User
Hi !

I use two instances of canvas one containing the content and one containing a progress bar and change between them using the setCurrent method.

regards
Reply With Quote

#4 Old Re: question regarding painting mechanism - 2009-03-09, 10:32

Join Date: Sep 2007
Posts: 874
honest_success's Avatar
honest_success
Offline
Forum Nokia Champion
Quote:
Originally Posted by rosenholzer View Post
Hi !

I use two instances of canvas one containing the content and one containing a progress bar and change between them using the setCurrent method.

regards

Can you tell me why you are using two canvas ? If you do not have any specific requirement for two canvas then i will suggest you to go with one canvas because it will effect the performance on small device which has limited memory. From your description i found that you can display progressbar and other content one by one on same canvas. You just need to use some boolean variable to know in the paint method that what you need to draw. You might solve your problem in this matter.

To be frank with you i could not understand the concept of buffer which you were talking about so if possible please explain in details because it never comes in front of me.
Reply With Quote

#5 Old Re: question regarding painting mechanism - 2009-03-09, 10:36

Join Date: Jul 2005
Posts: 29
rosenholzer
Offline
Registered User
Hi !

Thanks. Thats the solution i will do. But i was quite interested in the experience of other users and in the question: When is the Graphics objects content really rendered out ?


regards
Reply With Quote

#6 Old Re: question regarding painting mechanism - 2009-03-09, 10:57

Join Date: Jun 2007
Posts: 534
Location: Mumbai
Send a message via Yahoo to prakash.raman
prakash.raman's Avatar
prakash.raman
Offline
Super Contributor
Quote:
Originally Posted by rosenholzer View Post
Hi !

I use two instances of canvas one containing the content and one containing a progress bar and change between them using the setCurrent method.

regards
hi, if u want to show progress bar on the content then u need to use same canvas and same graphics of paint to show both.


au revoir
Prakash Raman
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
Similar Threads
Thread Thread Starter Forum Replies Last Post
my question is a question about the NOKIA MMSC EAIF EMULATOR. tinduc General Messaging 1 2003-04-14 04:14
i'm using the nokia mobile internet toolkit 3.1, and i have a question tinduc General Messaging 0 2003-04-07 10:52
Timer question! iecomdev Mobile Java General 2 2003-04-04 10:41
question deleted kiokups General Messaging 1 2002-09-25 21:07

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