Pixel draw VIDEO

support for the powerpc toolchain
Post Reply
steaky1212
Posts: 6
Joined: Thu Jun 04, 2009 6:25 pm

Pixel draw VIDEO

Post by steaky1212 » Mon Jun 29, 2009 9:31 pm

Hi,

I have a 2 dimensional array ( grid[400][400] ), is it possible to draw to the screen a colour dependent on the value in that position....

ie

Code: Select all

for(int x = 0; x<400; x++)
{
   for(int y = 0; y<400 ; y++)
   {
        PIXEL_COLOUR[x][y] = grid[x][y]
    }
}
or something like that?


thanks


--edit--

Oh, and can I get the colour of a pixel already displayed - so if I display a bmp/png/jpeg (whatever) can I get the pixel colour from the coordinate?

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests