home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / GVATRECT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  1.7 KB  |  58 lines

  1. /**
  2. *
  3. * Name        gvatrect -- Change attributes on a rectangle
  4. *                via BIOS or directly
  5. *
  6. * Synopsis    num_writ = gvatrect(u_row,u_col,l_row,l_col,fore,back);
  7. *
  8. *        int  num_writ    Number of character cells actually changed
  9. *        int  u_row    Top row to write (0 = top of screen)
  10. *        int  u_col    Leftmost column to write (0 = left edge)
  11. *        int  l_row    Bottom row to write
  12. *        int  l_col    Rightmost column to write
  13. *        int  fore,back    Foreground and background attributes
  14. *
  15. * Description    This function fills a rectangular area on the current
  16. *        display page with a given attribute without affecting
  17. *        the characters already displayed there.  The cursor is
  18. *        not moved.
  19. *
  20. *        The upper left corner of the region is (u_row,u_col),
  21. *        where (0,0) represents the upper left corner of the
  22. *        entire screen.    The lower right corner of the region is
  23. *        (l_row,l_col), where (24,79) is the lower right corner
  24. *        of an 80-by-25 screen.
  25. *
  26. *        The returned value reports the number of "character
  27. *        cells" written, where "character cells" means the number
  28. *        of physical spaces on the screen.
  29. *
  30. *        This function is available in two versions.  These call
  31. *        SCATRECT (which uses BIOS only) or VIATRECT (direct to
  32. *        video memory) depending on the value of the symbol
  33. *        GV_OPTION.  These versions are therefore subject to
  34. *        differing limitations.
  35. *
  36. * Returns    num_writ    Number of character cells changed
  37. *
  38. * Version    3.0  (C)Copyright Blaise Computing Inc. 1986
  39. *
  40. **/
  41.  
  42. #include <bgenvid.h>
  43.  
  44. int gvatrect(u_row,u_col,l_row,l_col,fore,back)
  45. int u_row,u_col,l_row,l_col;
  46. int fore,back;
  47. {
  48. #if (GV_OPTION) == (GV_BIOS)
  49.  
  50.     return scatrect(u_row,u_col,l_row,l_col,fore,back);
  51.  
  52. #else
  53.  
  54.     return viatrect(u_row,u_col,l_row,l_col,fore,back);
  55.  
  56. #endif
  57. }
  58.