erase.c 589 B

123456789101112131415161718192021222324252627282930
  1. /*!
  2. \file lib/pngdriver/erase.c
  3. \brief GRASS png display driver - erase screen
  4. (C) 2003-2014 by Per Henrik Johansen and the GRASS Development Team
  5. This program is free software under the GNU General Public License
  6. (>=v2). Read the file COPYING that comes with GRASS for details.
  7. \author Per Henrik Johansen (original contributor)
  8. \author Glynn Clements
  9. */
  10. #include "pngdriver.h"
  11. /*!
  12. \brief Erase screen
  13. */
  14. void PNG_Erase(void)
  15. {
  16. int n = png.width * png.height;
  17. int i;
  18. for (i = 0; i < n; i++)
  19. png.grid[i] = png.background;
  20. png.modified = 1;
  21. }