2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 typedef struct bogl_font {
30 char *name; /* Font name. */
31 int height; /* Height in pixels. */
32 int spacing; /* Vertical spacing in pixels. */
33 unsigned long *content; /* 32-bit right-padded bitmap array. */
34 short *offset; /* 256 offsets into content. */
35 unsigned char *width; /* 256 character widths. */
38 extern osd_font_t font_CaslonRoman_1_25;
39 extern osd_font_t font_helvB24;
40 extern osd_font_t font_helvB18;
48 static Surface* getScreen();
49 static int getFontHeight();
50 int getCharWidth(char c);
52 int drawText(const char* text, int x, int y, ULONG rgba);
53 int drawTextRJ(const char* text, int x, int y, ULONG rgba);
54 int drawTextCentre(const char* text, int x, int y, ULONG rgba);
56 virtual int create(UINT width, UINT height)=0;
57 virtual void display()=0;
59 virtual int fillblt(int x, int y, int width, int height, unsigned int c)=0;
60 virtual void drawPixel(int x, int y, unsigned int c)=0;
61 virtual void drawHorzLine(int x1, int x2, int y, unsigned int c)=0;
62 virtual void drawVertLine(int x, int y1, int y2, unsigned int c)=0;
63 virtual int updateToScreen(int sx, int sy, int w, int h, int dx, int dy)=0;
64 virtual void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b)=0;
65 virtual void screenShot(char* fileName)=0;
67 /* This is for system which need a locking of the drawing surface to speed up drawing */
68 virtual void startFastDraw() {};
69 virtual void endFastDraw() {};
72 virtual int blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy)=0;
74 const static int SCREEN = 1;
75 const static int BUFFER = 2;
78 static Surface* screen;
79 static osd_font_t* font;