xref: /haiku/src/add-ons/print/drivers/pcl5/PCL5.h (revision 68ea01249e1e2088933cb12f9c28d4e5c5d1c9ef)
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* message, PrinterData* printerData,
18 							const PrinterCap* printerCap);
19 
20 protected:
21 	virtual	bool		StartDocument();
22 	virtual	bool		StartPage(int page);
23 	virtual	bool		NextBand(BBitmap* bitmap, BPoint* offset);
24 	virtual	bool		EndPage(int page);
25 	virtual	bool		EndDocument(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