Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RGB codes - screen
Message
From
23/12/2010 17:25:53
 
 
To
23/12/2010 14:57:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01493739
Message ID:
01493750
Views:
75
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform