Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RGB codes - screen
Message
De
23/12/2010 17:25:53
 
 
À
23/12/2010 14:57:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01493739
Message ID:
01493750
Vues:
77
>i have a table with rgb codes.
>
>each rgb code represents one pixel.
>
>i need to display them one after another.
>
>the idea is basically to recreate the picture which is stored in the table.

First, you need to know the x,y coordinates of each of your pixels. Or, you need to know the x and y pixel sizes of the completed image, and whether you're filling the picture from top left to bottom right, bottom left to top right etc. In this latter case you can then calculate the coordinates of each point.

One way to draw the points would be to use the .PSet() method of _Screen or a Form. Using _Screen as an example (not tested):
* For each pixel, first you need to set the .Forecolor to the color you need:
_Screen.Forecolor = { RGB codes #1 }
_Screen.PSet( XCoord1, YCoord1 )

_Screen.Forecolor = { RGB codes #2 }
_Screen.PSet( XCoord2, YCoord2 )

...etc.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform