/* ciihtd.h ** Copyright (C) 1990, 1993 by Xerox Corporation. All rights reserved. ** Michael Plass, June 7, 1993 3:32:18 pm PDT */ #ifndef ciihtd_h #define ciihtd_h /* c++ compatibility */ #ifdef c_plusplus #define EXTERN extern "C" #else #define EXTERN extern #endif #include "cii.h" /********************************************************************** ** ** Creation of specific device handles ** ** The procedures in this section require a large number of ** parameters in order to fully specify the characteristics ** of the device. However, in most cases there are reasonable ** default values. To allow new parameters (with appropriate ** defaults) to be added without demanding source changes in ** the clients of this interface, the creation of handles is a ** three-step procedure. ** 1. The client requests an initialized parameter block, specific ** to the kind of output device that is required. ** 2. The client fills in those fields which differ from the ** default. ** 3. The client calls the device creation routine. ** In many cases, further calls must be made to fully initialize ** the device handle. ** ** **********************************************************************/ /********************** ** Halftoning device **********************/ /* CII_ScanMode: For specifying orientation of device rasters. */ typedef enum { CII_slowRightFastUp, CII_slowDownFastRight, CII_slowLeftFastDown, CII_slowUpFastLeft, CII_slowRightFastDown, CII_slowDownFastLeft, CII_slowLeftFastUp, CII_slowUpFastRight } CII_ScanMode; typedef struct CII_HTDParamRep { unsigned sSizeDevice; /* scan count of device space */ unsigned fSizeDevice; /* scan length of device space */ CII_ScanMode scanMode; /* default slowRightFastUp */ CII_VectorRep surfaceUnitsPerInch; /* default {1.0,1.0} */ unsigned logicalDevice; /* default 0 */ CII_RasterRep * raster; /* Must be 1 bit per pixel */ } CII_HTDParamRep; EXTERN CII_RES CII_HTD_SetDefaults(CII_HTDParamRep* paramRepResult); EXTERN CII_RES CII_HTD_Create(CII_HTDParamRep* param, CII_Handle* hResult); EXTERN CII_RES CII_HTD_SetBitmap( CII_Handle h, /* Must be from CII_HTD_Create */ CII_RasterRep* buffer /* Must be 1 bit per pixel; may not change size*/ ); /* What is this one? - mfp. ** In the Cedar impl, it is a NOP. */ EXTERN CII_RES CII_HTD_Destroy(CII_Handle h); /* The following two call should be phased out in favor ** of a stack-allocated paramRep. */ typedef CII_HTDParamRep* CII_HTDParam; EXTERN CII_RES CII_HTD_Defaults(CII_HTDParam *p); EXTERN CII_RES CII_HTD_DefaultsDestroy(CII_HTDParam p); #endif