1 /* 2 * PCL6.h 3 * Copyright 1999-2000 Y.Takagi. All Rights Reserved. 4 * Copyright 2003 Michael Pfeiffer. 5 */ 6 7 #ifndef __PCL6_H 8 #define __PCL6_H 9 10 #include "GraphicsDriver.h" 11 #include "jetlib.h" 12 13 class Halftone; 14 15 class PCL6Driver : public GraphicsDriver, private MJetlibClient { 16 public: 17 PCL6Driver(BMessage *msg, PrinterData *printer_data, const PrinterCap *printer_cap); 18 19 virtual void FlushOutBuffer(HP_StreamHandleType pStream, 20 unsigned long cookie, 21 HP_pUByte pOutBuffer, 22 HP_SInt32 currentBufferLen); 23 24 protected: 25 virtual bool startDoc(); 26 virtual bool startPage(int page); 27 virtual bool nextBand(BBitmap *bitmap, BPoint *offset); 28 virtual bool endPage(int page); 29 virtual bool endDoc(bool success); 30 31 private: 32 HP_UByte mediaSize(JobData::Paper paper); 33 void move(int x, int y); 34 void jobStart(); 35 void startRasterGraphics(int x, int y, int width, int height); 36 void endRasterGraphics(); 37 void rasterGraphics( 38 int compression_method, 39 const uchar *buffer, 40 int size); 41 void jobEnd(); 42 43 HP_StreamHandleType fStream; 44 int fCompressionMethod; 45 Halftone *fHalftone; 46 }; 47 48 #endif /* __PCL6_H */ 49