home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / unofficial-plug-ins / mathmap / tuples.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-21  |  1.2 KB  |  47 lines

  1. /*
  2.  * tuples.h
  3.  *
  4.  * MathMap
  5.  *
  6.  * Copyright (C) 1997-2000 Mark Probst
  7.  *
  8.  * This program is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU General Public License
  10.  * as published by the Free Software Foundation; either version 2
  11.  * of the License, or (at your option) any later version.
  12.  *
  13.  * This program is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  * GNU General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU General Public License
  19.  * along with this program; if not, write to the Free Software
  20.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23. #ifndef __TUPLES_H__
  24. #define __TUPLES_H__
  25.  
  26. #define MAX_TUPLE_LENGTH     9
  27.  
  28. typedef struct
  29. {
  30.     int number;
  31.     int length;
  32. } tuple_info_t;
  33.  
  34. typedef struct
  35. {
  36.     float data[MAX_TUPLE_LENGTH];
  37.     int number;
  38.     int length;
  39. } tuple_t;
  40.  
  41. tuple_info_t make_tuple_info (int number, int length);
  42.  
  43. void tuple_to_color (tuple_t *tuple, float *red, float *green, float *blue, float *alpha);
  44. tuple_t color_to_tuple (float red, float green, float blue, float alpha);
  45.  
  46. #endif
  47.