2002-05-10 15:06:17 +00:00
|
|
|
/* gscolors - Color conversion routines
|
2002-03-27 23:44:41 +00:00
|
|
|
|
|
|
|
Copyright (C) 1995 Free Software Foundation, Inc.
|
|
|
|
|
2002-05-10 15:06:17 +00:00
|
|
|
Written by: Adam Fedor <fedor@gnu.org>
|
2002-03-27 23:44:41 +00:00
|
|
|
Date: Nov 1994
|
|
|
|
|
|
|
|
This file is part of the GNU Objective C User Interface Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
|
|
|
*/
|
|
|
|
|
2002-05-10 15:06:17 +00:00
|
|
|
#ifndef _gscolors_h_INCLUDE
|
|
|
|
#define _gscolors_h_INCLUDE
|
|
|
|
|
|
|
|
#define AINDEX 5
|
2002-03-27 23:44:41 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
gray_colorspace, rgb_colorspace, hsb_colorspace, cmyk_colorspace
|
2002-05-10 15:06:17 +00:00
|
|
|
} device_colorspace_t;
|
2002-03-27 23:44:41 +00:00
|
|
|
|
2002-05-10 15:06:17 +00:00
|
|
|
typedef struct _device_color {
|
|
|
|
device_colorspace_t space;
|
2002-03-27 23:44:41 +00:00
|
|
|
float field[6];
|
2002-05-10 15:06:17 +00:00
|
|
|
} device_color_t;
|
2002-03-27 23:44:41 +00:00
|
|
|
|
|
|
|
/* Internal conversion of colors to pixels values */
|
2002-05-10 15:06:17 +00:00
|
|
|
extern device_color_t gsMakeColor(device_colorspace_t space,
|
|
|
|
float a, float b, float c, float d);
|
|
|
|
extern device_color_t gsColorToRGB(device_color_t color);
|
|
|
|
extern device_color_t gsColorToGray(device_color_t color);
|
|
|
|
extern device_color_t gsColorToCMYK(device_color_t color);
|
|
|
|
extern device_color_t gsColorToHSB(device_color_t color);
|
2002-03-27 23:44:41 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|