vdr  2.2.0
Classes | Macros | Functions | Variables
osd.c File Reference
#include "osd.h"
#include <math.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/unistd.h>
#include "device.h"
#include "tools.h"

Go to the source code of this file.

Classes

class  cInitAlphaLut
 

Macros

#define USE_ALPHA_LUT
 

Functions

tColor HsvToColor (double H, double S, double V)
 
tColor RgbShade (tColor Color, double Factor)
 
tColor AlphaBlend (tColor ColorFg, tColor ColorBg, uint8_t AlphaLayer)
 

Variables

static uint16_t AlphaLutFactors [255][256][2]
 
static uint8_t AlphaLutAlpha [255][256]
 
class cInitAlphaLut InitAlphaLut
 
static const char * OsdErrorTexts []
 

Macro Definition Documentation

#define USE_ALPHA_LUT

Definition at line 53 of file osd.c.

Function Documentation

tColor AlphaBlend ( tColor  ColorFg,
tColor  ColorBg,
uint8_t  AlphaLayer 
)
tColor HsvToColor ( double  H,
double  S,
double  V 
)

Converts the given Hue (0..360), Saturation (0..1) and Value (0..1) to an RGB tColor value.

The alpha value of the result is 0x00, so the caller may need to set it accordingly.

Definition at line 19 of file osd.c.

References RgbToColor().

Referenced by cTrueColorDemo::Action(), and RgbToColor().

tColor RgbShade ( tColor  Color,
double  Factor 
)

Returns a brighter (Factor > 0) or darker (Factor < 0) version of the given Color.

If Factor is 0.0, the return value is the unchanged Color, If Factor is 1.0, white is returned. If Factor is -1.0, black is returned. The alpha value of Color is returned unchanged.

Definition at line 43 of file osd.c.

References constrain(), and min().

Referenced by RgbToColor().

Variable Documentation

uint8_t AlphaLutAlpha[255][256]
static

Definition at line 59 of file osd.c.

Referenced by AlphaBlend(), and cInitAlphaLut::cInitAlphaLut().

uint16_t AlphaLutFactors[255][256][2]
static

Definition at line 58 of file osd.c.

Referenced by AlphaBlend(), and cInitAlphaLut::cInitAlphaLut().

class cInitAlphaLut InitAlphaLut
const char* OsdErrorTexts[]
static
Initial value:
= {
"ok",
"too many areas",
"too many colors",
"bpp not supported",
"areas overlap",
"wrong alignment",
"out of memory",
"wrong area size",
"unknown",
}

Definition at line 1628 of file osd.c.

Referenced by cOsd::SetAreas().