color_init.c 758 B

123456789101112131415161718192021222324252627282930313233
  1. /*!
  2. \file lib/raster/color_init.c
  3. \brief Raster Library - Initialize Colors structure
  4. (C) 2001-2009 by 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 Original author CERL
  8. */
  9. #include <grass/gis.h>
  10. #include <grass/raster.h>
  11. /*!
  12. \brief Initialize color structure
  13. The <i>colors</i> structure is initialized for subsequent calls
  14. to Rast_add_c_color_rule() and Rast_set_c_color().
  15. \param colors pointer to Colors structure
  16. */
  17. void Rast_init_colors(struct Colors *colors)
  18. {
  19. G_zero(colors, sizeof(struct Colors));
  20. colors->cmax = -1;
  21. colors->fixed.max = -1;
  22. colors->modular.max = -1;
  23. }