home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / C-ASM_VI.ARJ / PROGC.ZIP / PROGC081.C < prev    next >
Text File  |  1988-05-15  |  769b  |  18 lines

  1.  
  2. /************************************************************************/
  3. /* Read back ten pixels and print their values                          */
  4. /************************************************************************/
  5.  
  6. read_10_pixels()
  7.         {
  8.         int     x, y, color;
  9.         printf("\nValues in raster 19 are: ");
  10.         y = 19;                         /* 20th raster from top         */
  11.         for (x = 0; x < 10; x++)        /* Loop over pixels             */
  12.                 {
  13.                 pixel_write(x, y, x);   /* Put in known value           */
  14.                 color = pixel_read(x,y);/* Read next value              */
  15.                 printf(" %2d", color);  /* Print value just read        */
  16.                 }
  17.         }
  18.