diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-10-15 12:24:12 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-13 11:26:55 +0200 |
commit | e088156d5b620e5e639580dacf85c6dc13823c74 (patch) | |
tree | 57f5c025e203279944da512166c20bc0521d8ccd /base/gxiclass.h | |
download | ghostscript-gpl-patches-e088156d5b620e5e639580dacf85c6dc13823c74.tar.gz ghostscript-gpl-patches-e088156d5b620e5e639580dacf85c6dc13823c74.tar.bz2 ghostscript-gpl-patches-e088156d5b620e5e639580dacf85c6dc13823c74.zip |
Import Ghostscript 9.50ghostscript-9.50
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'base/gxiclass.h')
-rw-r--r-- | base/gxiclass.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/base/gxiclass.h b/base/gxiclass.h new file mode 100644 index 00000000..730d08be --- /dev/null +++ b/base/gxiclass.h @@ -0,0 +1,62 @@ +/* Copyright (C) 2001-2019 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, + modified or distributed except as expressly authorized under the terms + of the license contained in the file LICENSE in this distribution. + + Refer to licensing information at http://www.artifex.com or contact + Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, + CA 94945, U.S.A., +1(415)492-9861, for further information. +*/ + + +/* Define image rendering algorithm classes */ + +#ifndef gxiclass_INCLUDED +# define gxiclass_INCLUDED + +#include "stdpre.h" +#include "gsdevice.h" + +/* Define the abstract type for the image enumerator state. */ +typedef struct gx_image_enum_s gx_image_enum; + +/* + * Define the interface for routines used to render a (source) scan line. + * If the buffer is the original client's input data, it may be unaligned; + * otherwise, it will always be aligned. + * + * The image_render procedures work on fully expanded, complete rows. These + * take a height argument, which is an integer >= 0; they return a negative + * code, or the number of rows actually processed (which may be less than + * the height). height = 0 is a special call to indicate that there is no + * more input data; this is necessary because the last scan lines of the + * source data may not produce any output. + * + * Note that the 'w' argument of the image_render procedure is the number + * of samples, i.e., the number of pixels * the number of samples per pixel. + * This is neither the width in pixels nor the width in bytes (in the case + * of 12-bit samples, which expand to 2 bytes apiece). + */ +#define irender_proc(proc)\ + int proc(gx_image_enum *penum, const byte *buffer, int data_x,\ + uint w, int h, gx_device *dev) +typedef irender_proc((*irender_proc_t)); + +/* + * Define procedures for selecting imaging methods according to the class of + * the image. Image class procedures are called in alphabetical order, so + * their names begin with a digit that indicates their priority + * (0_interpolate, etc.): each one may assume that all the previous ones + * failed. If a class procedure succeeds, it may update the enumerator + * structure as well as returning the rendering procedure. + */ +#define iclass_proc(proc)\ + int proc(gx_image_enum *penum, irender_proc_t *render_fn) +typedef iclass_proc((*gx_image_class_t)); + +#endif /* gxiclass_INCLUDED */ |