--- branches/dev-api-4/xvidcore/src/image/font.c 2003/06/09 01:25:19 1053 +++ branches/dev-api-4/xvidcore/src/image/font.c 2003/10/01 23:23:01 1161 @@ -1,40 +1,27 @@ - /****************************************************************************** - * * - * This file is part of XviD, a free MPEG-4 video encoder/decoder * - * * - * XviD is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * XviD is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * * - ******************************************************************************/ - - /****************************************************************************** - * * - * font.c * - * * - * Copyright (C) 2001 - Peter Ross * - * * - * For more information visit the XviD homepage: http://www.xvid.org * - * * - ******************************************************************************/ - - /****************************************************************************** - * * - * Revision history: * - * * - * 22.06.2002 inital version * - * * - ******************************************************************************/ +/***************************************************************************** + * + * XVID MPEG-4 VIDEO CODEC + * - Font rendering to frame buffer functions - + * + * Copyright(C) 2002-2003 Peter Ross + * + * This program is free software ; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation ; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY ; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program ; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: font.c,v 1.4.2.3 2003-10-01 23:23:01 edgomez Exp $ + * + ****************************************************************************/ #include #include @@ -46,16 +33,16 @@ #define FONT_HEIGHT 6 -static const char ascii33[33][FONT_WIDTH*FONT_HEIGHT] = { +static const char ascii33[33][FONT_WIDTH*FONT_HEIGHT] = { /* ! */ - {0,0,1,0, + {0,0,1,0, 0,0,1,0, 0,0,1,0, 0,0,1,0, 0,0,0,0, 0,0,1,0}, - + /* " */ {0,1,0,1, 0,1,0,1, @@ -63,7 +50,7 @@ 0,0,0,0, 0,0,0,0, 0,0,0,0}, - + /* # */ {0,1,1,0, 1,1,1,1, @@ -79,7 +66,7 @@ 0,1,1,1, 1,1,0,1, 0,1,1,0}, - + /* % */ {1,1,0,1, 1,0,0,1, @@ -127,7 +114,7 @@ 1,1,1,1, 0,1,1,0, 1,0,0,1}, - + /* + */ {0,0,0,0, 0,0,1,0, @@ -135,7 +122,7 @@ 0,1,1,1, 0,0,1,0, 0,0,1,0}, - + /* , */ {0,0,0,0, 0,0,0,0, @@ -143,7 +130,7 @@ 0,0,0,0, 0,1,1,0, 0,0,1,0}, - + /* - */ {0,0,0,0, 0,0,0,0, @@ -175,7 +162,7 @@ 1,1,0,1, 1,0,0,1, 0,1,1,0}, - + /* 1 */ {0,0,1,0, 0,0,1,0, @@ -183,7 +170,7 @@ 0,0,1,0, 0,0,1,0, 0,0,1,0}, - + /* 2 */ {0,1,1,0, 1,0,0,1, @@ -191,7 +178,7 @@ 0,1,0,0, 1,0,0,0, 1,1,1,1}, - + /* 3 */ {0,1,1,0, 1,0,0,1, @@ -307,7 +294,7 @@ }; -static const char ascii65[26][FONT_WIDTH*FONT_HEIGHT] = { +static const char ascii65[26][FONT_WIDTH*FONT_HEIGHT] = { /* A */ {0,1,1,0, 1,0,0,1, @@ -315,7 +302,7 @@ 1,1,1,1, 1,0,0,1, 1,0,0,1}, - + /* B */ {1,1,1,0, 1,0,0,1, @@ -323,7 +310,7 @@ 1,0,0,1, 1,0,0,1, 1,1,1,0}, - + /* C */ {0,1,1,0, 1,0,0,1, @@ -331,7 +318,7 @@ 1,0,0,0, 1,0,0,1, 0,1,1,0}, - + /* D */ {1,1,0,0, 1,0,1,0, @@ -521,7 +508,7 @@ -static const char ascii91[6][FONT_WIDTH*FONT_HEIGHT] = { +static const char ascii91[6][FONT_WIDTH*FONT_HEIGHT] = { /* [ */ {0,1,1,0, 0,1,0,0, @@ -594,7 +581,7 @@ #define FONT_BUF_SZ 1024 -void image_printf(IMAGE * img, int edged_width, int height, +void image_printf(IMAGE * img, int edged_width, int height, int x, int y, char *fmt, ...) { va_list args;