13bfe34e2SMichael Pfeiffer /* 2d2c03b1bSMichael Pfeiffer * PCL6.h 33bfe34e2SMichael Pfeiffer * Copyright 1999-2000 Y.Takagi. All Rights Reserved. 4d2c03b1bSMichael Pfeiffer * Copyright 2003 Michael Pfeiffer. 53bfe34e2SMichael Pfeiffer */ 63bfe34e2SMichael Pfeiffer 73bfe34e2SMichael Pfeiffer #ifndef __PCL6_H 83bfe34e2SMichael Pfeiffer #define __PCL6_H 93bfe34e2SMichael Pfeiffer 10b1a3ccb8SMichael Pfeiffer 113bfe34e2SMichael Pfeiffer #include "GraphicsDriver.h" 12b1a3ccb8SMichael Pfeiffer #include "PCL6Writer.h" 133bfe34e2SMichael Pfeiffer 143bfe34e2SMichael Pfeiffer class Halftone; 153bfe34e2SMichael Pfeiffer 16*2e86189fSMichael Pfeiffer class PCL6Driver : public GraphicsDriver, public PCL6WriterStream 17b1a3ccb8SMichael Pfeiffer { 183bfe34e2SMichael Pfeiffer public: 193bfe34e2SMichael Pfeiffer PCL6Driver(BMessage *msg, PrinterData *printer_data, const PrinterCap *printer_cap); 203bfe34e2SMichael Pfeiffer 21*2e86189fSMichael Pfeiffer void write(const uint8 *data, uint32 size); 223bfe34e2SMichael Pfeiffer 233bfe34e2SMichael Pfeiffer protected: 243bfe34e2SMichael Pfeiffer virtual bool startDoc(); 253bfe34e2SMichael Pfeiffer virtual bool startPage(int page); 263bfe34e2SMichael Pfeiffer virtual bool nextBand(BBitmap *bitmap, BPoint *offset); 273bfe34e2SMichael Pfeiffer virtual bool endPage(int page); 283bfe34e2SMichael Pfeiffer virtual bool endDoc(bool success); 293bfe34e2SMichael Pfeiffer 303bfe34e2SMichael Pfeiffer private: 31*2e86189fSMichael Pfeiffer bool supportsDeltaRowCompression(); 32b1a3ccb8SMichael Pfeiffer PCL6Writer::MediaSize mediaSize(JobData::Paper paper); 33b1a3ccb8SMichael Pfeiffer PCL6Writer::MediaSource mediaSource(JobData::PaperSource source); 343bfe34e2SMichael Pfeiffer void move(int x, int y); 353bfe34e2SMichael Pfeiffer void jobStart(); 36dcab4343SMichael Pfeiffer void writeBitmap(const uchar* buffer, int outSize, int rowSize, int x, int y, int width, int height, int deltaRowSize); 37b1a3ccb8SMichael Pfeiffer void startRasterGraphics(int x, int y, int width, int height, PCL6Writer::Compression compressionMethod); 383bfe34e2SMichael Pfeiffer void endRasterGraphics(); 393bfe34e2SMichael Pfeiffer void rasterGraphics( 403bfe34e2SMichael Pfeiffer const uchar *buffer, 41dcab4343SMichael Pfeiffer int bufferSize, 42dcab4343SMichael Pfeiffer int dataSize, 43dcab4343SMichael Pfeiffer int rowSize, 44dcab4343SMichael Pfeiffer int height, 45dcab4343SMichael Pfeiffer int compression_method); 463bfe34e2SMichael Pfeiffer void jobEnd(); 473bfe34e2SMichael Pfeiffer 48b1a3ccb8SMichael Pfeiffer PCL6Writer *fWriter; 49b1a3ccb8SMichael Pfeiffer PCL6Writer::MediaSide fMediaSide; // side if in duplex mode 50d2c03b1bSMichael Pfeiffer Halftone *fHalftone; 513bfe34e2SMichael Pfeiffer }; 523bfe34e2SMichael Pfeiffer 53d2c03b1bSMichael Pfeiffer #endif /* __PCL6_H */ 54