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]
}
}
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?