DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T g

⟦bfcc3d8f1⟧ TextFile

    Length: 2256 (0x8d0)
    Types: TextFile
    Names: »gzcolor.h«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦ff23ba0e6⟧ »./ghostscript-1.3.tar.Z« 
        └─⟦a24a58cd3⟧ 
            └─⟦this⟧ »gzcolor.h« 

TextFile

/* 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 {
	gx_color_index color1;		/* device color, or */
					/* darker color for halftoning */
	gx_color_index color2;		/* lighter color for halftoning */
	int halftone_level;		/* number of spots to whiten */
					/* when halftoning, 0 if */
					/* halftoning not needed */
	struct gx_bitmap_s *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)