1
2#ifndef DRAWING_ENGINE_H
3#define DRAWING_ENGINE_H
4
5#include <GraphicsDefs.h>
6#include <Region.h>
7
8class AccelerantHWInterface;
9class DirectWindowBuffer;
10
11class DrawingEngine {
12 public:
13								DrawingEngine(AccelerantHWInterface* interface,
14											  DirectWindowBuffer* buffer);
15	virtual						~DrawingEngine();
16
17			bool				Lock();
18			void				Unlock();
19
20			void				ConstrainClipping(BRegion* region);
21
22			bool				StraightLine(BPoint a, BPoint b, const rgb_color& c);
23			void				StrokeLine(BPoint a, BPoint b, const rgb_color& color);
24			void				StrokeRect(BRect r, const rgb_color& color);
25
26			void				FillRegion(BRegion *region, const rgb_color& color);
27
28			void				DrawString(const char* string, BPoint baseLine,
29										   const rgb_color& color);
30
31			void				CopyRegion(BRegion *region, int32 xOffset, int32 yOffset);
32
33 private:
34	AccelerantHWInterface*		fHWInterface;
35	DirectWindowBuffer*			fBuffer;
36	BRegion						fCurrentClipping;
37};
38
39
40#endif // DRAWING_ENGINE_H
41
42