1 /*****************************************************************************\ 2 Hbpl1.h : Interface for the Hbpl1 class 3 4 Copyright (c) 1996 - 2015, HP Co. 5 All rights reserved. 6 7 Redistribution and use in source and binary forms, with or without 8 modification, are permitted provided that the following conditions 9 are met: 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 HP 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. 18 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 30 Author(s): Suma Byrappa 31 \*****************************************************************************/ 32 33 34 #ifndef HBPL1_H 35 #define HBPL1_H 36 #include "CommonDefinitions.h" 37 #include "Pipeline.h" 38 #include "Encapsulator.h" 39 #include "ColorMatcher.h" 40 #include "Halftoner.h" 41 #include "resources.h" 42 #include "ColorMaps.h" 43 #include "PrinterCommands.h" 44 #include "Utils.h" 45 #include "Hbpl1_Wrapper.h" 46 #define HBPL1_DEFAULT_STRIP_HEIGHT 128 47 48 class Hbpl1Wrapper; 49 50 enum COLORTHEME 51 { 52 NONE = 0, 53 DEFAULTSRGB = 1, 54 PHOTOSRGB = 2, 55 ADOBERGB = 3, 56 VIVIDSRGB = 4 57 }; 58 59 class Hbpl1 : public Encapsulator 60 { 61 62 friend class Hbpl1Wrapper; 63 64 public: 65 Hbpl1 (); 66 ~Hbpl1 (); 67 DRIVER_ERROR Encapsulate (RASTERDATA *InputRaster, bool bLastPlane); 68 DRIVER_ERROR StartPage(JobAttributes *pJA); 69 DRIVER_ERROR StartJob(SystemServices*, JobAttributes*); 70 DRIVER_ERROR Configure(Pipeline **pipeline); 71 DRIVER_ERROR FormFeed(); 72 DRIVER_ERROR EndJob(); SendCAPy(int iOffset)73 DRIVER_ERROR SendCAPy(int iOffset) {return NO_ERROR;} CanSkipRasters()74 bool CanSkipRasters() {return false;} 75 76 protected: flushPrinterBuffer()77 DRIVER_ERROR flushPrinterBuffer() {return NO_ERROR;} 78 virtual DRIVER_ERROR addJobSettings(); 79 80 private: 81 DRIVER_ERROR EndPage (); 82 DRIVER_ERROR sendBlankBands(); 83 PrintMode m_PM; 84 int m_iCurRaster; 85 int m_iPlaneNumber; 86 int m_iBpp; 87 int m_iPlanes; 88 long long m_nStripSize; 89 long long m_nStripHeight; 90 int m_nBandCount; 91 long long m_numScanLines; 92 int m_nScanLineCount; 93 long long m_nScanLineSize; 94 int m_numStrips; 95 BYTE *m_pbyStripData; 96 BYTE *m_pOutBuffer; 97 int m_OutBuffSize; 98 JobAttributes m_JA; 99 void *m_hHPLibHandle; 100 bool m_init; 101 bool m_Economode; 102 bool m_PrintinGrayscale; 103 COLORTHEME m_ColorTheme; 104 COLORTYPE m_ColorMode; 105 Hbpl1Wrapper *m_pHbpl1Wrapper; 106 }; // Hbpl1 107 108 #endif // HBPL1_H 109 110