mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Made some functions of cFont virtual to allow implementing dummy fonts for the 'curses' skin
This commit is contained in:
parent
e056cae892
commit
d6f2f1675c
2
HISTORY
2
HISTORY
@ -2864,3 +2864,5 @@ Video Disk Recorder Revision History
|
||||
CA ids to be added to the channel definitions (thanks to Wayne Keer for reporting
|
||||
this one, and Marcel Wiesweg for fixing it).
|
||||
- Fixed handling colors in cDvbSpuPalette::yuv2rgb() (thanks to Marco Schlüßler).
|
||||
- Made some functions of cFont virtual to allow implementing dummy fonts for the
|
||||
'curses' skin.
|
||||
|
6
font.c
6
font.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: font.c 1.7 2004/05/16 10:50:59 kls Exp $
|
||||
* $Id: font.c 1.8 2004/05/31 14:09:00 kls Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -54,10 +54,14 @@ cFont::cFont(void *Data)
|
||||
|
||||
void cFont::SetData(void *Data)
|
||||
{
|
||||
if (Data) {
|
||||
height = ((tCharData *)Data)->height;
|
||||
for (int i = 0; i < NUMCHARS; i++)
|
||||
data[i] = (tCharData *)&((tPixelData *)Data)[(i < 32 ? 0 : i - 32) * (height + 2)];
|
||||
}
|
||||
else
|
||||
height = 0;
|
||||
}
|
||||
|
||||
int cFont::Width(const char *s) const
|
||||
{
|
||||
|
12
font.h
12
font.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: font.h 1.7 2004/05/16 10:49:44 kls Exp $
|
||||
* $Id: font.h 1.8 2004/05/31 14:09:00 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __FONT_H
|
||||
@ -43,15 +43,15 @@ private:
|
||||
public:
|
||||
cFont(void *Data);
|
||||
void SetData(void *Data);
|
||||
int Width(unsigned char c) const { return data[c]->width; }
|
||||
virtual int Width(unsigned char c) const { return data[c]->width; }
|
||||
///< Returns the width of the given character.
|
||||
int Width(const char *s) const;
|
||||
virtual int Width(const char *s) const;
|
||||
///< Returns the width of the given string.
|
||||
int Height(unsigned char c) const { return data[c]->height; }
|
||||
virtual int Height(unsigned char c) const { return data[c]->height; }
|
||||
///< Returns the height of the given character.
|
||||
int Height(const char *s) const;
|
||||
virtual int Height(const char *s) const;
|
||||
///< Returns the height of the given string.
|
||||
int Height(void) const { return height; }
|
||||
virtual int Height(void) const { return height; }
|
||||
///< Returns the height of this font (all characters have the same height).
|
||||
const tCharData *CharData(unsigned char c) const { return data[c]; }
|
||||
static bool SetCode(const char *Code);
|
||||
|
4
osd.h
4
osd.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: osd.h 1.42 2004/05/28 15:25:58 kls Exp $
|
||||
* $Id: osd.h 1.43 2004/05/31 14:09:00 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __OSD_H
|
||||
@ -290,7 +290,7 @@ public:
|
||||
///< -1..-8 draws the inverted part of the given quadrant(s)
|
||||
///< If Quadrants is not 0, the coordinates are those of the actual area, not
|
||||
///< the full circle!
|
||||
void DrawSlope(int x1, int y1, int x2, int y2, tColor Color, int Type);
|
||||
virtual void DrawSlope(int x1, int y1, int x2, int y2, tColor Color, int Type);
|
||||
///< Draws a "slope" into the rectangle defined by the upper left (x1, y1) and
|
||||
///< lower right (x2, y2) corners with the given Color. Type controls the
|
||||
///< direction of the slope and which side of it will be drawn:
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skinclassic.c 1.6 2004/05/29 13:29:00 kls Exp $
|
||||
* $Id: skinclassic.c 1.7 2004/05/31 14:09:00 kls Exp $
|
||||
*/
|
||||
|
||||
#include "skinclassic.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skinsttng.c 1.4 2004/05/29 13:14:09 kls Exp $
|
||||
* $Id: skinsttng.c 1.5 2004/05/31 14:09:00 kls Exp $
|
||||
*/
|
||||
|
||||
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
||||
|
Loading…
Reference in New Issue
Block a user