next up previous contents index
Next: Entrée/Sorties Up: Le débogueur gdb Previous: Dessins bitmaps

Exemple 2

#include <win.h>

int main()
{
  byte r[256*128];
  byte g[256*128];
  byte b[256*128];
  int i, j;
  
  winInit(512, 512, black);
  for (i=0;i<256;i++)
    for (j=0;j<128;j++){
      /* dégradé */
      r[i+256*j]=80;
      g[i+256*j]=160;
      b[i+256*j]=(i+j)%256;
    }
  winColorImage(r, g, b, 256, 128, 0, 0);
  winLoop();
  return 0;
}


Jean-Philippe Chancelier
9/29/1998