Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GdiPlusX - ImageCanvas
Message
 
À
26/11/2007 10:12:53
Information générale
Forum:
Visual FoxPro
Catégorie:
VFPX/Sedna
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01271183
Message ID:
01271635
Vues:
81
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform