summaryrefslogtreecommitdiff
path: root/screen.h
blob: efb14ed2e0fa1f739180ef847c64ac707463016c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//								-*- c++ -*-

#ifndef VDR_TEXT2SKIN_SCREEN_H
#define VDR_TEXT2SKIN_SCREEN_H

#include "common.h"
#include "setup.h"
#include <vdr/osd.h>

// #undef DIRECTBLIT
//#define DIRECTBLIT

class cText2SkinScreen {
	/* Skin Editor */
	friend class VSkinnerScreen;

private:
	cOsd    *mOsd;
	cBitmap *mScreen;
	cBitmap *mRegions[MAXOSDAREAS];
	bool     mOffScreen;
	int      mNumRegions;

protected:
	static void DrawBitmapOverlay(cBitmap &Dest, int x, int y, cBitmap &Bitmap,
	                              const tColor *ColorMask = NULL);

public:
	cText2SkinScreen(bool OffScreen = false);
	~cText2SkinScreen();

	eOsdError SetAreas(const tArea *Areas, int NumAreas);

	void Clear(void);
	void DrawBitmap(int x, int y, const cBitmap &Bitmap, const tColor *ColorMask = NULL);
	void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color);
	void DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font,
	              int Width = 0, int Height = 0, int Alignment = taDefault);
	void DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quadrants = 0);
	void DrawSlope(int x1, int y1, int x2, int y2, tColor Color, int Type);

	void Flush(void);

	bool IsOpen(void) const { return mOsd != NULL; }
};

#endif // VDR_TEXT2SKIN_SCREEN_H