How to do continuously drawing of Line, rectangle,polyline and Etc...
| Tue, 2008-03-11 03:56 | |
|
Hi All, I have drawing application in which I am able to draw point,line, polyline, polygon,rectangle, and round rectangle. Now I want to draw this continously . How I will do that. Please give me some hints aur idea so I can draw continuously. I am waiting for reply. Thanks in advance. Thanks & Regards Symbian OS 9.1,S60 3rd edition MR,and CodeWarrior 3.1 |
|






Forum posts: 586
What do you mean by "continously"?
Forum posts: 128
Hi Andreas,
Thanks for reply,
In my application I can draw 1)point, 2) Line, 3) Polyline, 4) polygon, 5) rectangle, 6) Round rectangle.
Now I want to draw in order(First point then Line, then Polyline and so on). I want to draw first point and after 1 or 2 second it must draw Line and so on.
Thanks & Regards
Ram
Symbian OS 9.1,S60 3rd edition MR,and CodeWarrior 3.1
Forum posts: 25
Can you use User::After() api?
If you want timed output, you can also go for an object of the
CPeriodicclass.Forum posts: 128
Hi Aniait,
Thanks for your reply, Now I understand that I have to use Time function so I can draw after 1 or 2 seconds. I am trying to implement in my application.
Thanks & Regards
Ram
Symbian OS 9.1,S60 3rd edition MR,and CodeWarrior 3.1
Forum posts: 61
User::After() is a synchronous function and will hang the devide for that period of time. Rather than going for a synchronous process, it is always advisable to better use an asynchronous approach, using CActive or CPeriodic APIs.
Forum posts: 128
HI SymbianReady,
Thanks for your reply. I am going to use CActive and RunL() Method.
Thanks & Regards
Ram
Symbian OS 9.1,S60 3rd edition MR,and CodeWarrior 3.1
Forum posts: 1134
Just a small note:
User::After does not "hang the device", it will suspend the thread from within it is called, for the specified time.
The problem, and advantage, with it is though that it will suspend the thread at the exact point where it is called, so no active objects can be handled in that thread during the suspension.
Other threads in the device will continue to run as if nothing has happened.
And a tip:
I'd suggest you use CTimer instead of the raw CActive if you want a timer AO.
No need to invent the wheel twice.
Forum posts: 128
Hi Alh,
Thank you for reply. I want AO timer so I can use CTimer. I search in SDK and found that CTimer is derived from CActive. and CPeriodic is derived from CTimer. It is good for me to giving information about User::After.
Thanks & Regards
Ram
Symbian OS 9.1,S60 3rd edition MR,and CodeWarrior 3.1
Forum posts: 1134
Yes.
CActive is the base class for all AO, so all AOs is naturally derived from CActive.
CTimer is good to derive your class from if you want to create a new class which main function is being a timer that does something on a regular interval.
CPeriodic is very useful if you already have a class that is based on CBase, for example a view, but need to slap on a timer to it to do something special.
CPeriodic should not be derived from any further.
Forum posts: 61
Acknowledged. Used wrong words. Thanks for the correction Mr. Hedman.