Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GdiPlusX - ImageCanvas
Message
 
To
26/11/2007 10:12:53
General information
Forum:
Visual FoxPro
Category:
VFPX/Sedna
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01271183
Message ID:
01271635
Views:
80
This message has been marked as a message which has helped to the initial question of the thread.
>What are the advantages (except less code) of (GdiPlusX)ImageCanvas
>versus direct drawing on form surface (shape or container)

You also get the advantage of VFP determining the visibility of your object if it is contained in a page frame or any other container that has it's Visiblity property set.

It also respects ZOrder where as direct drawing to the Form can be nearly impossible to handle.

Another advantage is that if you use the imgCanvas class you can reference the Image object in a report. No need to even redraw.

>What about speed;
>Is drawing speed to ImageCanvas faster versus drawing on
>Plain Shape or Container via form handle ?

It is a trade off for performance. If you need to draw a lot, as in animations, you are better off direct drawing (until we get the client window canvas complete). But if you just need to do occassional draws, like every ThisForm.Refresh() using imgCanvas can make your app seem faster because VFP is handling your paint refreshes. You don't have to redraw everytime your form resizes or another window moves across the top of your canvas form. VFP does it for you.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform