]> git.vomp.tv Git - vompclient.git/blob - surfacevector.h
Preparations for dynamic mode switching
[vompclient.git] / surfacevector.h
1 /*\r
2     Copyright 2012 Marten Richter\r
3 \r
4     This file is part of VOMP.\r
5 \r
6     VOMP is free software; you can redistribute it and/or modify\r
7     it under the terms of the GNU General Public License as published by\r
8     the Free Software Foundation; either version 2 of the License, or\r
9     (at your option) any later version.\r
10 \r
11     VOMP is distributed in the hope that it will be useful,\r
12     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14     GNU General Public License for more details.\r
15 \r
16     You should have received a copy of the GNU General Public License\r
17     along with VOMP; if not, write to the Free Software\r
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\r
19 */\r
20 \r
21 #ifndef SURFACEVECTOR_H\r
22 #define SURFACEVECTOR_H\r
23 \r
24 #include "surface.h"\r
25 #include "osdvector.h"\r
26 \r
27 #include <list>\r
28 \r
29 \r
30 class SurfaceVector : public Surface\r
31 {\r
32   public:\r
33     SurfaceVector(OsdVector* vosd);\r
34     virtual ~SurfaceVector();\r
35 \r
36     int getFontHeight();\r
37     float getCharWidth(wchar_t c);\r
38     wchar_t getWChar(const char* str, unsigned int *length);\r
39 \r
40     int drawText(const char* text, int x, int y, const DrawStyle& c);\r
41     int drawText(const char* text, int x, int y, int width, const DrawStyle& c);\r
42     int drawTextRJ(const char* text, int x, int y, const DrawStyle& c);\r
43     int drawTextCentre(const char* text, int x, int y, const DrawStyle& c);\r
44 \r
45     void drawJpeg(const char *fileName,int x, int y,int *width, int *height);\r
46 \r
47     int create(UINT width, UINT height);\r
48     void display();\r
49 \r
50     int fillblt(int x, int y, int width, int height, const DrawStyle& c);\r
51     void drawHorzLine(int x1, int x2, int y, const DrawStyle& c);\r
52     void drawVertLine(int x, int y1, int y2, const DrawStyle& c);\r
53     void drawBitmap(int x, int y, const Bitmap& bm,const DisplayRegion & region);\r
54     void drawPoint(int x, int y, DrawStyle& c, bool fastdraw=false); // This draws a point, must not be a pixel\r
55     void drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,unsigned int width, Colour& nextColour);\r
56     int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);\r
57 \r
58 \r
59     /* This is for system which need a locking of the drawing surface to speed up drawing */\r
60     void startFastDraw();\r
61     void endFastDraw() ;\r
62 \r
63 \r
64     void drawTTChar(int ox, int oy,int x, int y, cTeletextChar c);\r
65 \r
66     void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b){};\r
67     void screenShot(const char* fileName){};\r
68 \r
69   protected:\r
70 \r
71 \r
72     int removeCommands(float x,float y,float width,float height);\r
73 \r
74     list<SVGCommand> commands;\r
75     int swidth, sheight;\r
76     Mutex command_mutex;\r
77     OsdVector* osd;\r
78 \r
79     void drawPixel(int x, int y, unsigned int c, bool fastdraw){}; // these are not supported!\r
80     void drawPixel(int x, int y, Colour& c, bool fastdraw){};\r
81 \r
82 \r
83 };\r
84 \r
85 \r
86 \r
87 \r
88 \r
89 \r
90 \r
91 \r
92 \r
93 #endif\r