xref: /haiku/src/add-ons/print/drivers/pcl5/PCL5.h (revision 1294543de9ac0eff000eaea1b18368c36435d08e)
1 /*
2  * PCL5.h
3  * Copyright 1999-2000 Y.Takagi. All Rights Reserved.
4  */
5 #ifndef __PCL5_H
6 #define __PCL5_H
7 
8 
9 #include "GraphicsDriver.h"
10 
11 
12 class Halftone;
13 
14 
15 class PCL5Driver : public GraphicsDriver {
16 public:
17 						PCL5Driver(BMessage* msg, PrinterData* printer_data,
18 							const PrinterCap* printer_cap);
19 
20 protected:
21 	virtual	bool		startDoc();
22 	virtual	bool		startPage(int page);
23 	virtual	bool		nextBand(BBitmap* bitmap, BPoint* offset);
24 	virtual	bool		endPage(int page);
25 	virtual	bool		endDoc(bool success);
26 
27 private:
28 			void		move(int x, int y);
29 			void		jobStart();
30 			void		startRasterGraphics(int width, int height);
31 			void		endRasterGraphics();
32 			void		rasterGraphics(int compression_method,
33 							const uchar* buffer, int size, bool lastPlane);
34 			void		jobEnd();
35 			int			bytesToEnterCompressionMethod(int compression_method);
36 
37 			int			fCompressionMethod;
38 			Halftone*	fHalftone;
39 };
40 
41 #endif // __PCL5_H
42