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

⟦1d7c21cd9⟧ TextFile

    Length: 3739 (0xe9b)
    Types: TextFile
    Names: »gxchar.h«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦ff23ba0e6⟧ »./ghostscript-1.3.tar.Z« 
        └─⟦a24a58cd3⟧ 
            └─⟦this⟧ »gxchar.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.  */

/* gxchar.h */
/* Internal character definition for GhostScript library */
/* Requires gsmatrix.h, gxfixed.h, gzdevice.h */
#include "gschar.h"

/* An entry for a (font,matrix) pair in the character cache. */
typedef struct cached_fm_pair_s cached_fm_pair;
struct cached_fm_pair_s {
	struct gs_font_s *font;		/* base font */
	float mxx, mxy, myx, myy;	/* transformation */
	int num_chars;			/* # of cached chars with this */
					/* f/m pair */
};

/* A cached bitmap for an individual character. */
typedef struct cached_char_s cached_char;
struct cached_char_s {
	cached_char *next;		/* next in replacement ring */
	/* The code and font/matrix pair are the 'key' in the cache. */
	int code;			/* character code */
	cached_fm_pair *pair;		/* font/matrix pair */
	/* The rest of the structure is the 'value'. */
	unsigned short raster, height;	/* dimensions of bitmap */
	unsigned short width;
	gs_fixed_point wxy;		/* width in device coords */
	gs_fixed_point offset;		/* (-llx, -lly) in device coords */
	byte *bits;
};

/* An enumeration object for string display. */
typedef enum {
	sws_none,
	sws_cache,
	sws_no_cache
} show_width_status;
struct gs_show_enum_s {
	/* Following are set at creation time */
	gs_state *pgs;
	byte *str;			/* char may be signed! */
	int use_size;			/* true if size known, */
					/* false if null-terminated */
	uint size;
	float cx, cy;			/* for widthshow */
	int chr;			/* ditto */
	float ax, ay;			/* for ashow */
	int add;			/* true if a[width]show */
	int do_kern;			/* true if kshow */
	int slow_show;			/* [a][width]show or kshow */
	int charpath_flag;		/* flag from charpath */
	int can_cache;			/* true if can cache chars */
	int cxmin, cymin, cxmax, cymax;	/* int version of quick-check */
					/* clipping box */
	/* Following are set at most once */
	gx_device_memory dev_cache_info;
	device dev_cache_dev;
	int dev_cache_set;
	/* Following are updated dynamically */
	uint index;			/* index within string */
	gs_fixed_point wxy;		/* for current char in device coords */
	gs_fixed_point current_point;	/* cache current point in fast */
					/* show loop */
	cached_char *cc;		/* being accumulated */
	gs_point width;			/* total width of string, set at end */
	show_width_status width_set;
	int (*continue_proc)(P1(struct gs_show_enum_s *));	/* continuation procedure */
};

/* Cached character procedures (in gxfont.c) */
cached_char *	gx_alloc_char_bits(P4(struct gs_font_dir_s *,
			gx_device_memory *, ushort, ushort));
void	gx_unalloc_cached_char(P2(struct gs_font_dir_s *, cached_char *));
cached_fm_pair *	gx_lookup_fm_pair(P1(gs_state *));
void	gx_add_cached_char(P3(struct gs_font_dir_s *, cached_char *, cached_fm_pair *));
cached_char *	gx_lookup_cached_char(P3(gs_state *, cached_fm_pair *, int));
int	gx_copy_cached_char(P2(gs_show_enum *, cached_char *));