color_init.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*!
  2. * \file raster/color_init.c
  3. *
  4. * \brief Raster Library - Initialize Colors structure
  5. *
  6. * (C) 2001-2009 by the GRASS Development Team
  7. *
  8. * This program is free software under the GNU General Public License
  9. * (>=v2). Read the file COPYING that comes with GRASS for details.
  10. *
  11. * \author Original author CERL
  12. */
  13. #include <grass/gis.h>
  14. #include <grass/raster.h>
  15. /*!
  16. * \brief Initialize color structure
  17. *
  18. * The <i>colors</i> structure is initialized for subsequent calls
  19. * to Rast_add_c_color_rule() and Rast_set_c_color().
  20. *
  21. * \param colors pointer to Colors structure
  22. */
  23. void Rast_init_colors(struct Colors *colors)
  24. {
  25. colors->version = 0;
  26. colors->null_set = 0;
  27. colors->undef_set = 0;
  28. colors->shift = 0.0;
  29. colors->invert = 0;
  30. colors->cmin = 0;
  31. colors->is_float = 0;
  32. colors->cmax = -1;
  33. colors->fixed.min = 0;
  34. colors->fixed.max = -1;
  35. colors->fixed.rules = NULL;
  36. colors->fixed.n_rules = 0;
  37. colors->fixed.lookup.active = 0;
  38. colors->fixed.fp_lookup.active = 0;
  39. colors->fixed.fp_lookup.nalloc = 0;
  40. colors->modular.min = 0;
  41. colors->modular.max = -1;
  42. colors->modular.rules = NULL;
  43. colors->modular.n_rules = 0;
  44. colors->modular.lookup.active = 0;
  45. colors->modular.fp_lookup.active = 0;
  46. colors->modular.fp_lookup.nalloc = 0;
  47. colors->organizing = 0;
  48. }