2 Copyright 2004-2005 Chris Tallon
\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
25 #include "defines.h"
\r
28 #include "teletextdecodervbiebu.h"
\r
32 typedef struct bogl_font {
\r
33 char *name; /* Font name. */
\r
34 int height; /* Height in pixels. */
\r
35 int spacing; /* Vertical spacing in pixels. */
\r
36 unsigned long *content; /* 32-bit right-padded bitmap array. */
\r
37 short *offset; /* 256 offsets into content. */
\r
38 unsigned char *width; /* 256 character widths. */
\r
41 //extern osd_font_t font_CaslonRoman_1_25;
\r
42 //extern osd_font_t font_helvB24;
\r
43 extern osd_font_t font_helvB18;
\r
52 Surface(int id = 0);
\r
55 static Surface* getScreen();
\r
56 virtual int getFontHeight();
\r
57 virtual int getCharWidth(char c);
\r
59 virtual int drawText(const char* text, int x, int y, ULONG rgba);
\r
60 virtual int drawText(const char* text, int x, int y, int width, ULONG rgba);
\r
61 virtual int drawTextRJ(const char* text, int x, int y, ULONG rgba);
\r
62 virtual int drawTextCentre(const char* text, int x, int y, ULONG rgba);
\r
64 virtual void drawJpeg(const char *fileName,int x, int y,int *width, int *height) {}
\r
66 virtual int create(UINT width, UINT height)=0;
\r
67 virtual void display()=0;
\r
69 virtual int fillblt(int x, int y, int width, int height, unsigned int c)=0;
\r
70 virtual void drawPixel(int x, int y, unsigned int c, bool fastdraw=false)=0;
\r
71 virtual void drawPixel(int x, int y, Colour& c, bool fastdraw=false)=0;
\r
72 virtual void drawHorzLine(int x1, int x2, int y, unsigned int c)=0;
\r
73 virtual void drawVertLine(int x, int y1, int y2, unsigned int c)=0;
\r
74 virtual void drawBitmap(int x, int y, const Bitmap& bm)=0;
\r
75 virtual int updateToScreen(int sx, int sy, int w, int h, int dx, int dy)=0;
\r
76 virtual void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b)=0;
\r
77 virtual void screenShot(const char* fileName)=0;
\r
79 /* This is for system which need a locking of the drawing surface to speed up drawing */
\r
80 virtual void startFastDraw() {};
\r
81 virtual void endFastDraw() {};
\r
84 virtual void drawTTChar(int ox, int oy,int x, int y, cTeletextChar c);
\r
89 // virtual int blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy)=0;
\r
91 const static int SCREEN = 1;
\r
92 const static int BUFFER = 2;
\r
95 static Surface* screen;
\r
96 static osd_font_t* font;
\r
97 Colour enumTeletextColorToCoulour(enumTeletextColor ttcol);
\r