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