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 #ifndef __PCL6_H 73bfe34e2SMichael Pfeiffer #define __PCL6_H 83bfe34e2SMichael Pfeiffer 9b1a3ccb8SMichael Pfeiffer 103bfe34e2SMichael Pfeiffer #include "GraphicsDriver.h" 11ee47c060SMichael Pfeiffer #include "PCL6Cap.h" 12b1a3ccb8SMichael Pfeiffer #include "PCL6Writer.h" 133bfe34e2SMichael Pfeiffer 14568716beSWim van der Meer 153bfe34e2SMichael Pfeiffer class Halftone; 163bfe34e2SMichael Pfeiffer 17568716beSWim van der Meer 182e86189fSMichael Pfeiffer class PCL6Driver : public GraphicsDriver, public PCL6WriterStream 19b1a3ccb8SMichael Pfeiffer { 203bfe34e2SMichael Pfeiffer public: 21*fefd3ba5SMichael Pfeiffer PCL6Driver(BMessage* message, PrinterData* printerData, 22*fefd3ba5SMichael Pfeiffer const PrinterCap* printerCap); 233bfe34e2SMichael Pfeiffer 24*fefd3ba5SMichael Pfeiffer void Write(const uint8* data, uint32 size); 253bfe34e2SMichael Pfeiffer 263bfe34e2SMichael Pfeiffer protected: 27*fefd3ba5SMichael Pfeiffer virtual bool StartDocument(); 28*fefd3ba5SMichael Pfeiffer virtual bool StartPage(int page); 29*fefd3ba5SMichael Pfeiffer virtual bool NextBand(BBitmap* bitmap, BPoint* offset); 30*fefd3ba5SMichael Pfeiffer virtual bool EndPage(int page); 31*fefd3ba5SMichael Pfeiffer virtual bool EndDocument(bool success); 323bfe34e2SMichael Pfeiffer 333bfe34e2SMichael Pfeiffer private: 34*fefd3ba5SMichael Pfeiffer bool _SupportsRLECompression(); 35*fefd3ba5SMichael Pfeiffer bool _SupportsDeltaRowCompression(); 36*fefd3ba5SMichael Pfeiffer bool _UseColorMode(); 37*fefd3ba5SMichael Pfeiffer PCL6Writer::MediaSize _MediaSize(JobData::Paper paper); 38*fefd3ba5SMichael Pfeiffer PCL6Writer::MediaSource _MediaSource(JobData::PaperSource source); 39*fefd3ba5SMichael Pfeiffer void _Move(int x, int y); 40*fefd3ba5SMichael Pfeiffer void _JobStart(); 41*fefd3ba5SMichael Pfeiffer void _WriteBitmap(const uchar* buffer, int outSize, int rowSize, 42568716beSWim van der Meer int x, int y, int width, int height, int deltaRowSize); 43*fefd3ba5SMichael Pfeiffer void _StartRasterGraphics(int x, int y, int width, int height, 44568716beSWim van der Meer PCL6Writer::Compression compressionMethod); 45*fefd3ba5SMichael Pfeiffer void _EndRasterGraphics(); 46*fefd3ba5SMichael Pfeiffer void _RasterGraphics(const uchar* buffer, int bufferSize, 47568716beSWim van der Meer int dataSize, int rowSize, int height, 48dcab4343SMichael Pfeiffer int compression_method); 49*fefd3ba5SMichael Pfeiffer void _JobEnd(); 503bfe34e2SMichael Pfeiffer 51b1a3ccb8SMichael Pfeiffer PCL6Writer* fWriter; 52b1a3ccb8SMichael Pfeiffer PCL6Writer::MediaSide fMediaSide; // side if in duplex mode 53d2c03b1bSMichael Pfeiffer Halftone* fHalftone; 543bfe34e2SMichael Pfeiffer }; 553bfe34e2SMichael Pfeiffer 56568716beSWim van der Meer #endif // __PCL6_H 57