Category : C Source Code
Archive   : GHSTSCPT.ZIP
Filename : GZCOLOR.H

 
Output of file : GZCOLOR.H contained in archive : GHSTSCPT.ZIP
/* Copyright (C) 1989 Aladdin Enterprises. All rights reserved.
Distributed by Free Software Foundation, Inc.

This file is part of Ghostscript.

Ghostscript is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
to anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing. Refer
to the Ghostscript General Public License for full details.

Everyone is granted permission to copy, modify and redistribute
Ghostscript, but only under the conditions described in the Ghostscript
General Public License. A copy of this license is supposed to have been
given to you along with Ghostscript so you can know your rights and
responsibilities. It should be in a file named COPYING. Among other
things, the copyright notice and this notice must be preserved on all
copies. */

/* gzcolor.h */
/* Private definition of color representation for GhostScript */

/* Representation of color. */
/* All the color parameters are stored internally as color_params. */
typedef unsigned short color_param;
#define max_color_param ((color_param)-1)
typedef struct float3_s {
float f1, f2, f3; /* 3 floats */
} float3;
typedef struct color_param3_s {
color_param q1, q2, q3;
} color_param3;

/* The following parameters are computed from the above, */
/* just before actually using the color to draw. */
typedef struct gx_device_color_s gx_device_color;
struct gx_device_color_s {
int color1; /* device color, or */
/* darker color for halftoning */
int color2; /* lighter color for halftoning */
int halftone_level; /* number of spots to whiten */
/* when halftoning, 0 if */
/* halftoning not needed */
gx_bitmap *tile; /* pointer to cached halftone */
};

/*typedef struct gs_color_s gs_color;*/ /* in gsstate.h */
struct gs_color_s {
color_param3 rgb; /* rgb representation */
#define red rgb.q1
#define green rgb.q2
#define blue rgb.q3
color_param3 hsb; /* hsb representation */
#define hue hsb.q1
#define saturation hsb.q2
#define brightness hsb.q3
gx_device_color dev_color;
};
#define color_is_pure(pcolor)\
((pcolor)->dev_color.halftone_level == 0)


  3 Responses to “Category : C Source Code
Archive   : GHSTSCPT.ZIP
Filename : GZCOLOR.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/