/*
 * $Id: Shading.h,v 1.0 91/08/22 15:34:08 gnb Exp $ 
 * $Source: /export/data/sources/x/At/Plotter/RCS/Shading.h,v $
 * 
 * $Log:	Shading.h,v $
 * Revision 1.0  91/08/22  15:34:08  gnb
 * Initial revision
 * 
 * 
 */

/*

Copyright 1991 by Burdett, Buckeridge & Young Ltd.

All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Burdett, Buckeridge &
Young Ltd. (BBY) not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.

BBY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
BBY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.

*/
/*
 * Specify Grayscale and stippling in a manner that is compatable
 * between printers and X
 */

#ifndef _Shading_h
#define _Shading_h

typedef enum {
     AtGRAY0, AtGRAY1, AtGRAY2, AtGRAY3, AtGRAY4, AtGRAY5, AtGRAY6,
     AtGRAY7, AtGRAY8, AtGRAY9, AtGRAY10
     } AtShading;

#define XtNshading "shading"
#define XtRShading "Shading"
#define XtCShading "Shading"

#ifndef P
# ifdef __STDC__
#  define P(args) args
# else
#  define P(args) ()
# endif
#endif

/*
 * Some routines to access the gray information
 *
 * The first two implement a cache of pixmaps, one pixmap per screen
 * per gray level.  The pixmaps are ref counted so they can be
 * released, saving server resources.
 *
 * The PostScript routine writes to the specified file a string that
 * sets the postscript graphics state so that a fill operation will
 * have the required apearance.
 *
 * The last is a routine to register a string to Shading converter.
 */

extern Pixmap AtShadingGetPixmap P((Screen *, AtShading, 
				    Pixel fg, Pixel bg));
extern void AtShadingReleasePixmap P((Pixmap));

extern char *AtShadingPS P((AtShading));

extern void AtRegisterShadingConverter P((void));

#endif /* _Shading_h */
