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
12class Halftone;
13
14
15class PCL5Driver : public GraphicsDriver {
16public:
17						PCL5Driver(BMessage* message, PrinterData* printerData,
18							const PrinterCap* printerCap);
19
20protected:
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
27private:
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