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
|
CA ids to be added to the channel definitions (thanks to Wayne Keer for reporting
|
||||||
this one, and Marcel Wiesweg for fixing it).
|
this one, and Marcel Wiesweg for fixing it).
|
||||||
- Fixed handling colors in cDvbSpuPalette::yuv2rgb() (thanks to Marco Schlüßler).
|
- 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
12
font.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "config.h"
|
||||||
@ -54,9 +54,13 @@ cFont::cFont(void *Data)
|
|||||||
|
|
||||||
void cFont::SetData(void *Data)
|
void cFont::SetData(void *Data)
|
||||||
{
|
{
|
||||||
height = ((tCharData *)Data)->height;
|
if (Data) {
|
||||||
for (int i = 0; i < NUMCHARS; i++)
|
height = ((tCharData *)Data)->height;
|
||||||
data[i] = (tCharData *)&((tPixelData *)Data)[(i < 32 ? 0 : i - 32) * (height + 2)];
|
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
|
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
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __FONT_H
|
||||||
@ -43,15 +43,15 @@ private:
|
|||||||
public:
|
public:
|
||||||
cFont(void *Data);
|
cFont(void *Data);
|
||||||
void SetData(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.
|
///< 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.
|
///< 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.
|
///< 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.
|
///< 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).
|
///< Returns the height of this font (all characters have the same height).
|
||||||
const tCharData *CharData(unsigned char c) const { return data[c]; }
|
const tCharData *CharData(unsigned char c) const { return data[c]; }
|
||||||
static bool SetCode(const char *Code);
|
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
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __OSD_H
|
||||||
@ -290,7 +290,7 @@ public:
|
|||||||
///< -1..-8 draws the inverted part of the given quadrant(s)
|
///< -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
|
///< If Quadrants is not 0, the coordinates are those of the actual area, not
|
||||||
///< the full circle!
|
///< 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
|
///< 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
|
///< lower right (x2, y2) corners with the given Color. Type controls the
|
||||||
///< direction of the slope and which side of it will be drawn:
|
///< 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
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "skinclassic.h"
|
||||||
@ -71,7 +71,7 @@ THEME_CLR(Theme, clrReplayProgressCurrent, clrRed);
|
|||||||
|
|
||||||
// --- cSkinClassicDisplayChannel --------------------------------------------
|
// --- cSkinClassicDisplayChannel --------------------------------------------
|
||||||
|
|
||||||
class cSkinClassicDisplayChannel : public cSkinDisplayChannel{
|
class cSkinClassicDisplayChannel : public cSkinDisplayChannel {
|
||||||
private:
|
private:
|
||||||
cOsd *osd;
|
cOsd *osd;
|
||||||
int lineHeight;
|
int lineHeight;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
||||||
@ -116,7 +116,7 @@ THEME_CLR(Theme, clrReplayProgressCurrent, clrRed);
|
|||||||
|
|
||||||
// --- cSkinSTTNGDisplayChannel ----------------------------------------------
|
// --- cSkinSTTNGDisplayChannel ----------------------------------------------
|
||||||
|
|
||||||
class cSkinSTTNGDisplayChannel : public cSkinDisplayChannel{
|
class cSkinSTTNGDisplayChannel : public cSkinDisplayChannel {
|
||||||
private:
|
private:
|
||||||
cOsd *osd;
|
cOsd *osd;
|
||||||
int x0, x1, x2, x3, x4, x5, x6, x7;
|
int x0, x1, x2, x3, x4, x5, x6, x7;
|
||||||
|
Loading…
Reference in New Issue
Block a user