1 /*****************************************************************************\
2 job.h : Interface/Implimentation for the Job class
4 Copyright (c) 1996 - 2001, Hewlett-Packard Co.
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15 3. Neither the name of Hewlett-Packard nor the names of its
16 contributors may be used to endorse or promote products derived
17 from this software without specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
20 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
22 NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24 TO, PATENT INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
25 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 \*****************************************************************************/
37 #if defined(APDK_VIP_COLORFILTERING)
51 //! Manages processes to create output for the device
52 /*! \class Job job.h "hpprintapi.h"
53 This object receives processes and transmits data to be printed by one device
54 on successive pages. The PrintContext and Job together form the core of the
58 ******************************************************************************/
61 friend class RasterSender;
64 Job(PrintContext* pPC);
68 DRIVER_ERROR constructor_error; // caller must check upon return
70 DRIVER_ERROR SendRasters(BYTE* ImageData=(BYTE*)NULL);
72 DRIVER_ERROR SendRasters(BYTE* BlackImageData, BYTE* ColorImageData);
74 DRIVER_ERROR SupportSeparateBlack(BOOL* bSeparateBlack);
76 #if defined(APDK_FONTS_NEEDED)
77 DRIVER_ERROR TextOut(const char* pTextString, unsigned int iLenString,
78 const Font& font, int iAbsX, int iAbsY );
79 // return theTextManager->TextOut(pTextString,iLenString,font,iAbsX,iAbsY);
83 DRIVER_ERROR NewPage();
87 PrintContext* thePrintContext;
90 Pipeline* thePipeline;
91 TextTranslator* pText;
92 RasterSender* pSender;
93 Halftoner* pHalftoner;
94 ColorMatcher* pColorMatcher;
96 Scaler* pBlackPlaneReplicator;
98 Compressor* theCompressor;
99 Compressor* pBlackPlaneCompressor;
101 #if defined(APDK_VIP_COLORFILTERING)
102 TErnieFilter* pErnie;
105 #if defined(APDK_FONTS_NEEDED)
106 TextManager* theTextManager;
109 PrintMode* CurrentMode;
112 unsigned int skipcount;
113 unsigned int RowsInput;
117 unsigned int CAPy; // maintains cursor-pos for graphics purposes,
118 // independent of intervening text positioning
121 unsigned int ResBoost; // for horizontal expansion
122 unsigned int numrows[MAXCOLORPLANES]; // rows per call for mixed-res only
123 unsigned int OutputWidth;
124 unsigned int InputWidth;
125 unsigned int ScaleFactor;
127 DRIVER_ERROR Configure();
128 DRIVER_ERROR InitScaler();
130 DRIVER_ERROR newpage();
131 DRIVER_ERROR SetupHalftoning(HALFTONING_ALGORITHM eHT);
132 DRIVER_ERROR SetupColorMatching();
133 DRIVER_ERROR SendCAPy();
134 DRIVER_ERROR sendrasters(BYTE* BlackImageData=(BYTE*)NULL, BYTE* ColorImageData=(BYTE*)NULL);
135 DRIVER_ERROR setblankraster();
136 DRIVER_ERROR setblackraster();
137 void SetOutputWidth();
140 void Capture_Job(PrintContext* pPC);
142 void Capture_SendRasters(BYTE* BlackImageData, BYTE* ColorImageData);
143 #if defined(APDK_FONTS_NEEDED)
144 void Capture_TextOut(const char* pTextString, unsigned int iLenString,
145 const Font& font, unsigned int iAbsX, unsigned int iAbsY );
147 void Capture_NewPage();
150 #ifdef APDK_USAGE_LOG
153 #define UTextSize 100
154 char UHeader[UTextSize*2];