1
0
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:
Klaus Schmidinger 2004-05-31 14:09:52 +02:00
parent e056cae892
commit d6f2f1675c
6 changed files with 22 additions and 16 deletions

View File

@ -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.

12
font.c
View File

@ -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,9 +54,13 @@ cFont::cFont(void *Data)
void cFont::SetData(void *Data)
{
height = ((tCharData *)Data)->height;
for (int i = 0; i < NUMCHARS; i++)
data[i] = (tCharData *)&((tPixelData *)Data)[(i < 32 ? 0 : i - 32) * (height + 2)];
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
View File

@ -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
View File

@ -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:

View File

@ -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"
@ -71,7 +71,7 @@ THEME_CLR(Theme, clrReplayProgressCurrent, clrRed);
// --- cSkinClassicDisplayChannel --------------------------------------------
class cSkinClassicDisplayChannel : public cSkinDisplayChannel{
class cSkinClassicDisplayChannel : public cSkinDisplayChannel {
private:
cOsd *osd;
int lineHeight;

View File

@ -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
@ -116,7 +116,7 @@ THEME_CLR(Theme, clrReplayProgressCurrent, clrRed);
// --- cSkinSTTNGDisplayChannel ----------------------------------------------
class cSkinSTTNGDisplayChannel : public cSkinDisplayChannel{
class cSkinSTTNGDisplayChannel : public cSkinDisplayChannel {
private:
cOsd *osd;
int x0, x1, x2, x3, x4, x5, x6, x7;