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