2 Copyright 2012 Marten Richter
\r
4 This file is part of VOMP.
\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
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
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
21 #ifndef SURFACEVECTOR_H
\r
22 #define SURFACEVECTOR_H
\r
24 #include "surface.h"
\r
25 #include "osdvector.h"
\r
30 class SurfaceVector : public Surface
\r
33 SurfaceVector(OsdVector* vosd);
\r
34 virtual ~SurfaceVector();
\r
36 int getFontHeight();
\r
37 float getCharWidth(wchar_t c);
\r
38 wchar_t getWChar(const char* str, unsigned int *length);
\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
45 void drawJpeg(const char *fileName,int x, int y,int *width, int *height);
\r
47 int create(UINT width, UINT height);
\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);
\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
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
64 void drawTTChar(int ox, int oy,int x, int y, cTeletextChar c);
\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
72 int removeCommands(float x,float y,float width,float height);
\r
74 list<SVGCommand> commands;
\r
75 int swidth, sheight;
\r
76 Mutex command_mutex;
\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