color.c 849 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*!
  2. \file lib/pngdriver/color.c
  3. \brief GRASS png display driver - PNG_color_rgb
  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 <grass/gis.h>
  11. #include "pngdriver.h"
  12. /*!
  13. \brief Identify a color
  14. Identify a color that has been set in the reset_color() (found in Reset_clr.c
  15. file in this directory). Subsequent graphics calls will use this color.
  16. Called by:
  17. Color() in ../lib/Color.c
  18. \param r red color value
  19. \param g green color value
  20. \param b blue color value
  21. */
  22. void PNG_color_rgb(int r, int g, int b)
  23. {
  24. png.current_color = png_get_color(r, g, b, 0);
  25. }