vdr
1.7.27
|
#include <osd.h>
Public Member Functions | |
virtual | ~cOsd () |
bool | IsTrueColor (void) const |
int | Left (void) |
int | Top (void) |
int | Width (void) |
int | Height (void) |
void | SetAntiAliasGranularity (uint FixedColors, uint BlendColors) |
cBitmap * | GetBitmap (int Area) |
virtual cPixmap * | CreatePixmap (int Layer, const cRect &ViewPort, const cRect &DrawPort=cRect::Null) |
virtual void | DestroyPixmap (cPixmap *Pixmap) |
virtual void | DrawImage (const cPoint &Point, const cImage &Image) |
virtual void | DrawImage (const cPoint &Point, int ImageHandle) |
virtual eOsdError | CanHandleAreas (const tArea *Areas, int NumAreas) |
virtual eOsdError | SetAreas (const tArea *Areas, int NumAreas) |
virtual void | SaveRegion (int x1, int y1, int x2, int y2) |
virtual void | RestoreRegion (void) |
virtual eOsdError | SetPalette (const cPalette &Palette, int Area) |
virtual void | DrawPixel (int x, int y, tColor Color) |
virtual void | DrawBitmap (int x, int y, const cBitmap &Bitmap, tColor ColorFg=0, tColor ColorBg=0, bool ReplacePalette=false, bool Overlay=false) |
virtual void | DrawText (int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width=0, int Height=0, int Alignment=taDefault) |
virtual void | DrawRectangle (int x1, int y1, int x2, int y2, tColor Color) |
virtual void | DrawEllipse (int x1, int y1, int x2, int y2, tColor Color, int Quadrants=0) |
virtual void | DrawSlope (int x1, int y1, int x2, int y2, tColor Color, int Type) |
virtual void | Flush (void) |
virtual | ~cOsd () |
bool | IsTrueColor (void) const |
int | Left (void) |
int | Top (void) |
int | Width (void) |
int | Height (void) |
void | SetAntiAliasGranularity (uint FixedColors, uint BlendColors) |
cBitmap * | GetBitmap (int Area) |
virtual cPixmap * | CreatePixmap (int Layer, const cRect &ViewPort, const cRect &DrawPort=cRect::Null) |
virtual void | DestroyPixmap (cPixmap *Pixmap) |
virtual void | DrawImage (const cPoint &Point, const cImage &Image) |
virtual void | DrawImage (const cPoint &Point, int ImageHandle) |
virtual eOsdError | CanHandleAreas (const tArea *Areas, int NumAreas) |
virtual eOsdError | SetAreas (const tArea *Areas, int NumAreas) |
virtual void | SaveRegion (int x1, int y1, int x2, int y2) |
virtual void | RestoreRegion (void) |
virtual eOsdError | SetPalette (const cPalette &Palette, int Area) |
virtual void | DrawPixel (int x, int y, tColor Color) |
virtual void | DrawBitmap (int x, int y, const cBitmap &Bitmap, tColor ColorFg=0, tColor ColorBg=0, bool ReplacePalette=false, bool Overlay=false) |
virtual void | DrawText (int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width=0, int Height=0, int Alignment=taDefault) |
virtual void | DrawRectangle (int x1, int y1, int x2, int y2, tColor Color) |
virtual void | DrawEllipse (int x1, int y1, int x2, int y2, tColor Color, int Quadrants=0) |
virtual void | DrawSlope (int x1, int y1, int x2, int y2, tColor Color, int Type) |
virtual void | Flush (void) |
Static Public Member Functions | |
static int | OsdLeft (void) |
static int | OsdTop (void) |
static int | OsdWidth (void) |
static int | OsdHeight (void) |
static void | SetOsdPosition (int Left, int Top, int Width, int Height) |
static int | IsOpen (void) |
static int | OsdLeft (void) |
static int | OsdTop (void) |
static int | OsdWidth (void) |
static int | OsdHeight (void) |
static void | SetOsdPosition (int Left, int Top, int Width, int Height) |
static int | IsOpen (void) |
Protected Member Functions | |
cOsd (int Left, int Top, uint Level) | |
bool | Active (void) |
virtual void | SetActive (bool On) |
const cPixmap *const * | Pixmaps (void) |
int | NumPixmaps (void) |
cPixmap * | AddPixmap (cPixmap *Pixmap) |
cPixmapMemory * | RenderPixmaps (void) |
cOsd (int Left, int Top, uint Level) | |
bool | Active (void) |
virtual void | SetActive (bool On) |
const cPixmap *const * | Pixmaps (void) |
int | NumPixmaps (void) |
cPixmap * | AddPixmap (cPixmap *Pixmap) |
cPixmapMemory * | RenderPixmaps (void) |
Private Attributes | |
bool | isTrueColor |
cBitmap * | savedBitmap |
cBitmap * | bitmaps [MAXOSDAREAS] |
int | numBitmaps |
cPixmapMemory * | savedPixmap |
cPixmap * | pixmaps [MAXOSDPIXMAPS] |
int | numPixmaps |
int | left |
int | top |
int | width |
int | height |
uint | level |
bool | active |
Static Private Attributes | |
static int | osdLeft = 0 |
static int | osdTop = 0 |
static int | osdWidth = 0 |
static int | osdHeight = 0 |
static cVector< cOsd * > | Osds |
static cMutex | mutex |
Friends | |
class | cOsdProvider |
The cOsd class is the interface to the "On Screen Display".
An actual output device needs to derive from this class and implement the functionality necessary to display the OSD on the TV screen. If the actual OSD supports "True Color", it can either let VDR do all the rendering by calling RenderPixmaps() ("raw mode"), or it can reimplement all necessary cPixmap functions and do the rendering itself ("high level mode"). If an OSD provides a "high level mode", it shall also provide a "raw mode" in order to verify proper operation. The plugin that implements the OSD shall offer a configuration switch in its setup.
Definition at line 707 of file include/vdr/osd.h.
cOsd::cOsd | ( | int | Left, |
int | Top, | ||
uint | Level | ||
) | [protected] |
Initializes the OSD with the given coordinates.
By default it is assumed that the full area will be able to display full 32 bit graphics (ARGB with eight bit for each color and the alpha value, repectively). However, the actual hardware in use may not be able to display such a high resolution OSD, so there is an option to divide the full OSD area into several sub-areas with lower color depths and individual palettes. The sub-areas need not necessarily cover the entire OSD area, but only the OSD area actually covered by sub-areas will be available for drawing. At least one area must be defined in order to set the actual width and height of the OSD. Also, the caller must first try to use an area that consists of only one sub-area that covers the entire drawing space, and should require only the minimum necessary color depth. This is because a derived cOsd class may or may not be able to handle more than one area. There can be any number of cOsd objects at the same time, but only one of them will be active at any given time. The active OSD is the one with the lowest value of Level. If there are several cOsd objects with the same Level, the one that was created first will be active.
Definition at line 1609 of file osd.c.
References active, cVector< T >::Append(), height, cVector< T >::Insert(), isTrueColor, left, Left(), level, mutex, numBitmaps, numPixmaps, Osds, savedBitmap, savedPixmap, cVector< T >::Size(), top, Top(), and width.
cOsd::~cOsd | ( | ) | [virtual] |
Shuts down the OSD.
Definition at line 1631 of file osd.c.
References bitmaps, mutex, numBitmaps, numPixmaps, Osds, pixmaps, cVector< T >::Remove(), savedBitmap, savedPixmap, SetActive(), and cVector< T >::Size().
cOsd::cOsd | ( | int | Left, |
int | Top, | ||
uint | Level | ||
) | [protected] |
Initializes the OSD with the given coordinates.
By default it is assumed that the full area will be able to display full 32 bit graphics (ARGB with eight bit for each color and the alpha value, repectively). However, the actual hardware in use may not be able to display such a high resolution OSD, so there is an option to divide the full OSD area into several sub-areas with lower color depths and individual palettes. The sub-areas need not necessarily cover the entire OSD area, but only the OSD area actually covered by sub-areas will be available for drawing. At least one area must be defined in order to set the actual width and height of the OSD. Also, the caller must first try to use an area that consists of only one sub-area that covers the entire drawing space, and should require only the minimum necessary color depth. This is because a derived cOsd class may or may not be able to handle more than one area. There can be any number of cOsd objects at the same time, but only one of them will be active at any given time. The active OSD is the one with the lowest value of Level. If there are several cOsd objects with the same Level, the one that was created first will be active.
virtual cOsd::~cOsd | ( | ) | [virtual] |
Shuts down the OSD.
bool cOsd::Active | ( | void | ) | [inline, protected] |
Definition at line 744 of file include/vdr/osd.h.
References active.
Referenced by cDvbSdFfOsd::Flush(), cHdffOsd::Flush(), cHdffOsdRaw::Flush(), cDvbSdFfOsd::SetActive(), cHdffOsd::SetActive(), and cHdffOsdRaw::SetActive().
bool cOsd::Active | ( | void | ) | [inline, protected] |
cPixmap * cOsd::AddPixmap | ( | cPixmap * | Pixmap | ) | [protected] |
Adds the given Pixmap to the list of currently active pixmaps in this OSD.
Returns Pixmap if the operation was successful, or NULL if the maximum number of pixmaps has been exceeded. A derived class that implements its own cPixmap class must call AddPixmap() in order to add a newly created pixmap to the OSD's list of pixmaps.
Definition at line 1705 of file osd.c.
References esyslog, LOCK_PIXMAPS, MAXOSDPIXMAPS, numPixmaps, and pixmaps.
Referenced by CreatePixmap().
cPixmap* cOsd::AddPixmap | ( | cPixmap * | Pixmap | ) | [protected] |
Adds the given Pixmap to the list of currently active pixmaps in this OSD.
Returns Pixmap if the operation was successful, or NULL if the maximum number of pixmaps has been exceeded. A derived class that implements its own cPixmap class must call AddPixmap() in order to add a newly created pixmap to the OSD's list of pixmaps.
eOsdError cOsd::CanHandleAreas | ( | const tArea * | Areas, |
int | NumAreas | ||
) | [virtual] |
Checks whether the OSD can display the given set of sub-areas.
The return value indicates whether a call to SetAreas() with this set of areas will succeed. CanHandleAreas() may be called with an OSD that is already in use with other areas and will not interfere with the current operation of the OSD. A derived class must first call the base class CanHandleAreas() to check the basic conditions, like not overlapping etc.
Reimplemented in cHdffOsdRaw, cHdffOsd, and cDvbSdFfOsd.
Definition at line 1764 of file osd.c.
References MAXOSDAREAS, oeAreasOverlap, oeOk, oeTooManyAreas, and oeWrongAlignment.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cDvbSpuDecoder::Draw(), cDvbSubtitleBitmaps::Draw(), cDvbSubtitleConverter::FinishPage(), and SetAreas().
virtual eOsdError cOsd::CanHandleAreas | ( | const tArea * | Areas, |
int | NumAreas | ||
) | [virtual] |
Checks whether the OSD can display the given set of sub-areas.
The return value indicates whether a call to SetAreas() with this set of areas will succeed. CanHandleAreas() may be called with an OSD that is already in use with other areas and will not interfere with the current operation of the OSD. A derived class must first call the base class CanHandleAreas() to check the basic conditions, like not overlapping etc.
Reimplemented in cHdffOsdRaw, cHdffOsd, and cDvbSdFfOsd.
cPixmap * cOsd::CreatePixmap | ( | int | Layer, |
const cRect & | ViewPort, | ||
const cRect & | DrawPort = cRect::Null |
||
) | [virtual] |
Creates a new true color pixmap on this OSD (see cPixmap for details).
The caller must not delete the returned object, it will be deleted when the OSD is deleted. DestroyPixmap() can be called if a pixmap shall be destroyed before the OSD is deleted. If this is not a true color OSD, this function returns NULL.
Definition at line 1673 of file osd.c.
References AddPixmap(), isTrueColor, and LOCK_PIXMAPS.
Referenced by cTrueColorDemo::Action(), cTrueColorDemo::CreateTextPixmap(), and SetAreas().
virtual cPixmap* cOsd::CreatePixmap | ( | int | Layer, |
const cRect & | ViewPort, | ||
const cRect & | DrawPort = cRect::Null |
||
) | [virtual] |
Creates a new true color pixmap on this OSD (see cPixmap for details).
The caller must not delete the returned object, it will be deleted when the OSD is deleted. DestroyPixmap() can be called if a pixmap shall be destroyed before the OSD is deleted. If this is not a true color OSD, this function returns NULL.
void cOsd::DestroyPixmap | ( | cPixmap * | Pixmap | ) | [virtual] |
Destroys the given Pixmap, which has previously been created by a call to CreatePixmap().
When the OSD is deleted, all pixmaps are destroyed automatically. So this function only needs to be used if a pixmap shall be destroyed while the OSD is still being used.
Definition at line 1685 of file osd.c.
References esyslog, isTrueColor, LOCK_PIXMAPS, cPixmap::MarkViewPortDirty(), numPixmaps, pixmaps, and cPixmap::ViewPort().
Referenced by cTrueColorDemo::ProcessKey().
virtual void cOsd::DestroyPixmap | ( | cPixmap * | Pixmap | ) | [virtual] |
Destroys the given Pixmap, which has previously been created by a call to CreatePixmap().
When the OSD is deleted, all pixmaps are destroyed automatically. So this function only needs to be used if a pixmap shall be destroyed while the OSD is still being used.
virtual void cOsd::DrawBitmap | ( | int | x, |
int | y, | ||
const cBitmap & | Bitmap, | ||
tColor | ColorFg = 0 , |
||
tColor | ColorBg = 0 , |
||
bool | ReplacePalette = false , |
||
bool | Overlay = false |
||
) | [virtual] |
Sets the pixels in the OSD with the data from the given Bitmap, putting the upper left corner of the Bitmap at (x, y).
If ColorFg or ColorBg is given, the first palette entry of the Bitmap will be mapped to ColorBg and the second palette entry will be mapped to ColorFg (palette indexes are defined so that 0 is the background and 1 is the foreground color). ReplacePalette controls whether the target area shall have its palette replaced with the one from Bitmap. If Overlay is true, any pixel in Bitmap that has color index 0 will not overwrite the corresponding pixel in the target area. If this is a true color OSD, ReplacePalette has no meaning.
Reimplemented in cHdffOsd.
void cOsd::DrawBitmap | ( | int | x, |
int | y, | ||
const cBitmap & | Bitmap, | ||
tColor | ColorFg = 0 , |
||
tColor | ColorBg = 0 , |
||
bool | ReplacePalette = false , |
||
bool | Overlay = false |
||
) | [virtual] |
Sets the pixels in the OSD with the data from the given Bitmap, putting the upper left corner of the Bitmap at (x, y).
If ColorFg or ColorBg is given, the first palette entry of the Bitmap will be mapped to ColorBg and the second palette entry will be mapped to ColorFg (palette indexes are defined so that 0 is the background and 1 is the foreground color). ReplacePalette controls whether the target area shall have its palette replaced with the one from Bitmap. If Overlay is true, any pixel in Bitmap that has color index 0 will not overwrite the corresponding pixel in the target area. If this is a true color OSD, ReplacePalette has no meaning.
Reimplemented in cHdffOsd.
Definition at line 1881 of file osd.c.
References bitmaps, cPixmap::DrawBitmap(), isTrueColor, numBitmaps, and pixmaps.
Referenced by cDvbSpuDecoder::Draw(), cDvbSubtitleBitmaps::Draw(), cSkinSTTNGDisplayMenu::DrawScrollbar(), RestoreRegion(), cSkinSTTNGDisplayTracks::SetAudioChannel(), cSkinSTTNGDisplayChannel::SetChannel(), cSkinSTTNGDisplayReplay::SetMode(), cSkinClassicDisplayReplay::SetProgress(), cSkinSTTNGDisplayReplay::SetProgress(), and cSkinSTTNGDisplayVolume::SetVolume().
virtual void cOsd::DrawEllipse | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
tColor | Color, | ||
int | Quadrants = 0 |
||
) | [virtual] |
Draws a filled ellipse defined by the upper left (x1, y1) and lower right (x2, y2) corners with the given Color.
Quadrants controls which parts of the ellipse are actually drawn: 0 draws the entire ellipse 1..4 draws only the first, second, third or fourth quadrant, respectively 5..8 draws the right, top, left or bottom half, respectively -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!
Reimplemented in cHdffOsd.
void cOsd::DrawEllipse | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
tColor | Color, | ||
int | Quadrants = 0 |
||
) | [virtual] |
Draws a filled ellipse defined by the upper left (x1, y1) and lower right (x2, y2) corners with the given Color.
Quadrants controls which parts of the ellipse are actually drawn: 0 draws the entire ellipse 1..4 draws only the first, second, third or fourth quadrant, respectively 5..8 draws the right, top, left or bottom half, respectively -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!
Reimplemented in cHdffOsd.
Definition at line 1911 of file osd.c.
References bitmaps, cPixmap::DrawEllipse(), isTrueColor, numBitmaps, and pixmaps.
Referenced by cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cSkinSTTNGDisplayMenu::DrawScrollbar(), cSkinSTTNGDisplayMenu::SetEvent(), cSkinSTTNGDisplayMenu::SetItem(), cSkinSTTNGDisplayTracks::SetItem(), and cSkinSTTNGDisplayMenu::SetRecording().
void cOsd::DrawImage | ( | const cPoint & | Point, |
const cImage & | Image | ||
) | [virtual] |
Draws the given Image on this OSD at the given Point.
If this is not a true color OSD, this function does nothing.
Definition at line 1859 of file osd.c.
References cPixmap::DrawImage(), isTrueColor, and pixmaps.
virtual void cOsd::DrawImage | ( | const cPoint & | Point, |
const cImage & | Image | ||
) | [virtual] |
Draws the given Image on this OSD at the given Point.
If this is not a true color OSD, this function does nothing.
void cOsd::DrawImage | ( | const cPoint & | Point, |
int | ImageHandle | ||
) | [virtual] |
Draws the image referenced by the given ImageHandle on this OSD at the given Point.
ImageHandle must be a value that has previously been returned by a call to cOsdProvider::StoreImage(). If ImageHandle has an invalid value, nothing happens. If this is not a true color OSD, this function does nothing.
Definition at line 1865 of file osd.c.
References cPixmap::DrawImage(), isTrueColor, and pixmaps.
virtual void cOsd::DrawImage | ( | const cPoint & | Point, |
int | ImageHandle | ||
) | [virtual] |
Draws the image referenced by the given ImageHandle on this OSD at the given Point.
ImageHandle must be a value that has previously been returned by a call to cOsdProvider::StoreImage(). If ImageHandle has an invalid value, nothing happens. If this is not a true color OSD, this function does nothing.
virtual void cOsd::DrawPixel | ( | int | x, |
int | y, | ||
tColor | Color | ||
) | [virtual] |
Sets the pixel at the given coordinates to the given Color, which is a full 32 bit ARGB value.
If the OSD area has been divided into separate sub-areas, and the given coordinates don't fall into any of these sub-areas, no pixel will be set.
Reimplemented in cHdffOsd.
void cOsd::DrawPixel | ( | int | x, |
int | y, | ||
tColor | Color | ||
) | [virtual] |
Sets the pixel at the given coordinates to the given Color, which is a full 32 bit ARGB value.
If the OSD area has been divided into separate sub-areas, and the given coordinates don't fall into any of these sub-areas, no pixel will be set.
Reimplemented in cHdffOsd.
Definition at line 1871 of file osd.c.
References bitmaps, cPixmap::DrawPixel(), isTrueColor, numBitmaps, and pixmaps.
void cOsd::DrawRectangle | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
tColor | Color | ||
) | [virtual] |
Draws a filled rectangle defined by the upper left (x1, y1) and lower right (x2, y2) corners with the given Color.
Reimplemented in cCursesOsd, and cHdffOsd.
Definition at line 1901 of file osd.c.
References bitmaps, cPixmap::DrawRectangle(), isTrueColor, numBitmaps, and pixmaps.
Referenced by cSkinClassicDisplayMenu::Clear(), cSkinCursesDisplayMenu::Clear(), cSkinSTTNGDisplayMenu::Clear(), cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinCursesDisplayChannel::cSkinCursesDisplayChannel(), cSkinCursesDisplayMenu::cSkinCursesDisplayMenu(), cSkinCursesDisplayReplay::cSkinCursesDisplayReplay(), cSkinCursesDisplayTracks::cSkinCursesDisplayTracks(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cSkinClassicDisplayMenu::DrawScrollbar(), cSkinCursesDisplayMenu::DrawScrollbar(), cSkinSTTNGDisplayMenu::DrawScrollbar(), cSkinSTTNGDisplayChannel::Flush(), cLineGame::ProcessKey(), cSkinSTTNGDisplayTracks::SetAudioChannel(), cSkinSTTNGDisplayMenu::SetButtons(), cSkinClassicDisplayChannel::SetChannel(), cSkinSTTNGDisplayChannel::SetChannel(), cSkinCursesDisplayChannel::SetChannel(), cSkinSTTNGDisplayMenu::SetEvent(), cSkinClassicDisplayChannel::SetEvents(), cSkinSTTNGDisplayChannel::SetEvents(), cSkinCursesDisplayChannel::SetEvents(), cSkinSTTNGDisplayMenu::SetItem(), cSkinSTTNGDisplayTracks::SetItem(), cSkinSTTNGDisplayChannel::SetMessage(), cSkinClassicDisplayMenu::SetMessage(), cSkinCursesDisplayMenu::SetMessage(), cSkinSTTNGDisplayReplay::SetMessage(), cSkinCursesDisplayReplay::SetProgress(), cSkinSTTNGDisplayMenu::SetRecording(), cSkinClassicDisplayVolume::SetVolume(), cSkinCursesDisplayVolume::SetVolume(), cSkinSTTNGDisplayVolume::SetVolume(), cLineGame::Show(), and cTrueColorDemo::Show().
virtual void cOsd::DrawRectangle | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
tColor | Color | ||
) | [virtual] |
Draws a filled rectangle defined by the upper left (x1, y1) and lower right (x2, y2) corners with the given Color.
Reimplemented in cCursesOsd, and cHdffOsd.
void cOsd::DrawSlope | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
tColor | Color, | ||
int | Type | ||
) | [virtual] |
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: 0: horizontal, rising, lower 1: horizontal, rising, upper 2: horizontal, falling, lower 3: horizontal, falling, upper 4: vertical, rising, lower 5: vertical, rising, upper 6: vertical, falling, lower 7: vertical, falling, upper
Reimplemented in cHdffOsd.
Definition at line 1921 of file osd.c.
References bitmaps, cPixmap::DrawSlope(), isTrueColor, numBitmaps, and pixmaps.
virtual void cOsd::DrawSlope | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
tColor | Color, | ||
int | Type | ||
) | [virtual] |
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: 0: horizontal, rising, lower 1: horizontal, rising, upper 2: horizontal, falling, lower 3: horizontal, falling, upper 4: vertical, rising, lower 5: vertical, rising, upper 6: vertical, falling, lower 7: vertical, falling, upper
Reimplemented in cHdffOsd.
virtual void cOsd::DrawText | ( | int | x, |
int | y, | ||
const char * | s, | ||
tColor | ColorFg, | ||
tColor | ColorBg, | ||
const cFont * | Font, | ||
int | Width = 0 , |
||
int | Height = 0 , |
||
int | Alignment = taDefault |
||
) | [virtual] |
Draws the given string at coordinates (x, y) with the given foreground and background color and font.
If Width and Height are given, the text will be drawn into a rectangle with the given size and the given Alignment (default is top-left). If ColorBg is clrTransparent, no background pixels will be drawn, which allows drawing "transparent" text.
Reimplemented in cCursesOsd, and cHdffOsd.
void cOsd::DrawText | ( | int | x, |
int | y, | ||
const char * | s, | ||
tColor | ColorFg, | ||
tColor | ColorBg, | ||
const cFont * | Font, | ||
int | Width = 0 , |
||
int | Height = 0 , |
||
int | Alignment = taDefault |
||
) | [virtual] |
Draws the given string at coordinates (x, y) with the given foreground and background color and font.
If Width and Height are given, the text will be drawn into a rectangle with the given size and the given Alignment (default is top-left). If ColorBg is clrTransparent, no background pixels will be drawn, which allows drawing "transparent" text.
Reimplemented in cCursesOsd, and cHdffOsd.
Definition at line 1891 of file osd.c.
References bitmaps, cPixmap::DrawText(), isTrueColor, numBitmaps, and pixmaps.
Referenced by cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinCursesDisplayTracks::cSkinCursesDisplayTracks(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cTextScroller::DrawText(), DrawTextOutlined(), cSkinClassicDisplayChannel::Flush(), cSkinSTTNGDisplayChannel::Flush(), cSkinClassicDisplayMenu::Flush(), cSkinCursesDisplayChannel::Flush(), cSkinCursesDisplayMenu::Flush(), cSkinSTTNGDisplayMenu::Flush(), cSkinClassicDisplayMenu::SetButtons(), cSkinCursesDisplayMenu::SetButtons(), cSkinSTTNGDisplayMenu::SetButtons(), cSkinClassicDisplayChannel::SetChannel(), cSkinSTTNGDisplayChannel::SetChannel(), cSkinCursesDisplayChannel::SetChannel(), cSkinClassicDisplayReplay::SetCurrent(), cSkinCursesDisplayReplay::SetCurrent(), cSkinSTTNGDisplayReplay::SetCurrent(), cSkinClassicDisplayMenu::SetEvent(), cSkinCursesDisplayMenu::SetEvent(), cSkinSTTNGDisplayMenu::SetEvent(), cSkinClassicDisplayChannel::SetEvents(), cSkinSTTNGDisplayChannel::SetEvents(), cSkinCursesDisplayChannel::SetEvents(), cSkinClassicDisplayMenu::SetItem(), cSkinCursesDisplayMenu::SetItem(), cSkinSTTNGDisplayMenu::SetItem(), cSkinClassicDisplayTracks::SetItem(), cSkinCursesDisplayTracks::SetItem(), cSkinSTTNGDisplayTracks::SetItem(), cSkinClassicDisplayReplay::SetJump(), cSkinCursesDisplayReplay::SetJump(), cSkinSTTNGDisplayReplay::SetJump(), cSkinClassicDisplayChannel::SetMessage(), cSkinSTTNGDisplayChannel::SetMessage(), cSkinClassicDisplayMenu::SetMessage(), cSkinCursesDisplayChannel::SetMessage(), cSkinCursesDisplayMenu::SetMessage(), cSkinSTTNGDisplayMenu::SetMessage(), cSkinClassicDisplayReplay::SetMessage(), cSkinCursesDisplayReplay::SetMessage(), cSkinCursesDisplayMessage::SetMessage(), cSkinClassicDisplayMessage::SetMessage(), cSkinSTTNGDisplayReplay::SetMessage(), cSkinSTTNGDisplayMessage::SetMessage(), cSkinClassicDisplayMenu::SetRecording(), cSkinCursesDisplayMenu::SetRecording(), cSkinSTTNGDisplayMenu::SetRecording(), cSkinClassicDisplayMenu::SetTitle(), cSkinCursesDisplayMenu::SetTitle(), cSkinSTTNGDisplayMenu::SetTitle(), cSkinClassicDisplayReplay::SetTitle(), cSkinCursesDisplayReplay::SetTitle(), cSkinSTTNGDisplayReplay::SetTitle(), cSkinClassicDisplayReplay::SetTotal(), cSkinCursesDisplayReplay::SetTotal(), cSkinSTTNGDisplayReplay::SetTotal(), cSkinClassicDisplayVolume::SetVolume(), and cSkinCursesDisplayVolume::SetVolume().
void cOsd::Flush | ( | void | ) | [virtual] |
Actually commits all data to the OSD hardware.
Flush() should return as soon as possible. For a true color OSD using the default implementation with in memory pixmaps, the Flush() function should basically do something like this:
LOCK_PIXMAPS; while (cPixmapMemory *pm = RenderPixmaps()) { int w = pm->ViewPort().Width(); int h = pm->ViewPort().Height(); int d = w * sizeof(tColor); MyOsdDrawPixmap(Left() + pm->ViewPort().X(), Top() + pm->ViewPort().Y(), pm->Data(), w, h, h * d); delete pm; }
Reimplemented in cHdffOsdRaw, cCursesOsd, cHdffOsd, and cDvbSdFfOsd.
Definition at line 1931 of file osd.c.
Referenced by cTrueColorDemo::Action(), cPictureControl::DisplayCaption(), cDvbSpuDecoder::Draw(), cDvbSubtitleBitmaps::Draw(), cSkinClassicDisplayChannel::Flush(), cSkinSTTNGDisplayChannel::Flush(), cSkinClassicDisplayMenu::Flush(), cSkinCursesDisplayChannel::Flush(), cSkinCursesDisplayMenu::Flush(), cSkinSTTNGDisplayMenu::Flush(), cSkinClassicDisplayReplay::Flush(), cSkinCursesDisplayReplay::Flush(), cSkinClassicDisplayVolume::Flush(), cSkinCursesDisplayVolume::Flush(), cSkinClassicDisplayTracks::Flush(), cSkinCursesDisplayTracks::Flush(), cSkinCursesDisplayMessage::Flush(), cSkinClassicDisplayMessage::Flush(), cSkinSTTNGDisplayReplay::Flush(), cSkinSTTNGDisplayVolume::Flush(), cSkinSTTNGDisplayTracks::Flush(), cSkinSTTNGDisplayMessage::Flush(), cLineGame::ProcessKey(), cLineGame::Show(), and cTrueColorDemo::Show().
virtual void cOsd::Flush | ( | void | ) | [virtual] |
Actually commits all data to the OSD hardware.
Flush() should return as soon as possible. For a true color OSD using the default implementation with in memory pixmaps, the Flush() function should basically do something like this:
LOCK_PIXMAPS; while (cPixmapMemory *pm = RenderPixmaps()) { int w = pm->ViewPort().Width(); int h = pm->ViewPort().Height(); int d = w * sizeof(tColor); MyOsdDrawPixmap(Left() + pm->ViewPort().X(), Top() + pm->ViewPort().Y(), pm->Data(), w, h, h * d); delete pm; }
Reimplemented in cHdffOsdRaw, cCursesOsd, cHdffOsd, and cDvbSdFfOsd.
cBitmap * cOsd::GetBitmap | ( | int | Area | ) |
Returns a pointer to the bitmap for the given Area, or NULL if no such bitmap exists.
If this is a true color OSD, a pointer to a dummy bitmap with 8bpp is returned. This is done so that skins that call this function in order to preset the bitmap's palette won't crash.
Reimplemented in cHdffOsd.
Definition at line 1666 of file osd.c.
References bitmaps, isTrueColor, and numBitmaps.
Referenced by cDvbSdFfOsd::Flush(), cHdffOsdRaw::Flush(), cDvbSdFfOsd::SetActive(), cHdffOsdRaw::SetActive(), and cDvbSdFfOsd::SetAreas().
cBitmap* cOsd::GetBitmap | ( | int | Area | ) |
Returns a pointer to the bitmap for the given Area, or NULL if no such bitmap exists.
If this is a true color OSD, a pointer to a dummy bitmap with 8bpp is returned. This is done so that skins that call this function in order to preset the bitmap's palette won't crash.
Reimplemented in cHdffOsd.
int cOsd::Height | ( | void | ) | [inline] |
Definition at line 794 of file include/vdr/osd.h.
References height.
Referenced by cTrueColorDemo::Action(), cDvbSdFfOsd::CanHandleAreas(), cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cDvbSdFfOsd::Flush(), SetAreas(), cSkinClassicDisplayChannel::SetEvents(), cSkinClassicDisplayVolume::SetVolume(), and cTrueColorDemo::Show().
int cOsd::Height | ( | void | ) | [inline] |
static int cOsd::IsOpen | ( | void | ) | [inline, static] |
Returns true if there is currently a level 0 OSD open.
Definition at line 786 of file osd.h.
References OSD_LEVEL_DEFAULT, Osds, and cVector< T >::Size().
static int cOsd::IsOpen | ( | void | ) | [inline, static] |
Returns true if there is currently a level 0 OSD open.
Definition at line 786 of file include/vdr/osd.h.
References OSD_LEVEL_DEFAULT, Osds, and cVector< T >::Size().
Referenced by main(), cOsdProvider::NewOsd(), and cReplayControl::ShowMode().
bool cOsd::IsTrueColor | ( | void | ) | const [inline] |
Returns 'true' if this is a true color OSD (providing full 32 bit color depth).
Definition at line 788 of file include/vdr/osd.h.
References isTrueColor.
Referenced by cHdffOsdRaw::Flush().
bool cOsd::IsTrueColor | ( | void | ) | const [inline] |
Returns 'true' if this is a true color OSD (providing full 32 bit color depth).
Definition at line 788 of file osd.h.
References isTrueColor.
int cOsd::Left | ( | void | ) | [inline] |
int cOsd::Left | ( | void | ) | [inline] |
Definition at line 791 of file include/vdr/osd.h.
References left.
Referenced by cHdffOsd::cHdffOsd(), cOsd(), cDvbSdFfOsd::Flush(), cHdffOsdRaw::Flush(), and SetOsdPosition().
int cOsd::NumPixmaps | ( | void | ) | [inline, protected] |
Returns the number of currently active pixmaps in this OSD.
Definition at line 750 of file osd.h.
References numPixmaps.
int cOsd::NumPixmaps | ( | void | ) | [inline, protected] |
Returns the number of currently active pixmaps in this OSD.
Definition at line 750 of file include/vdr/osd.h.
References numPixmaps.
static int cOsd::OsdHeight | ( | void | ) | [inline, static] |
Definition at line 780 of file include/vdr/osd.h.
References cSetup::OSDHeight, osdHeight, and Setup.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), and cTrueColorDemo::Show().
static int cOsd::OsdHeight | ( | void | ) | [inline, static] |
Definition at line 780 of file osd.h.
References cSetup::OSDHeight, osdHeight, and Setup.
static int cOsd::OsdLeft | ( | void | ) | [inline, static] |
Definition at line 777 of file osd.h.
References cSetup::OSDLeft, osdLeft, and Setup.
static int cOsd::OsdLeft | ( | void | ) | [inline, static] |
Definition at line 777 of file include/vdr/osd.h.
References cSetup::OSDLeft, osdLeft, and Setup.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), and cTrueColorDemo::Show().
static int cOsd::OsdTop | ( | void | ) | [inline, static] |
Definition at line 778 of file osd.h.
References cSetup::OSDTop, osdTop, and Setup.
static int cOsd::OsdTop | ( | void | ) | [inline, static] |
Definition at line 778 of file include/vdr/osd.h.
References cSetup::OSDTop, osdTop, and Setup.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), and cTrueColorDemo::Show().
static int cOsd::OsdWidth | ( | void | ) | [inline, static] |
Definition at line 779 of file include/vdr/osd.h.
References cSetup::OSDWidth, osdWidth, and Setup.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cSkinClassicDisplayMessage::SetMessage(), and cTrueColorDemo::Show().
static int cOsd::OsdWidth | ( | void | ) | [inline, static] |
Definition at line 779 of file osd.h.
References cSetup::OSDWidth, osdWidth, and Setup.
const cPixmap* const* cOsd::Pixmaps | ( | void | ) | [inline, protected] |
const cPixmap* const* cOsd::Pixmaps | ( | void | ) | [inline, protected] |
Returns the list of currently active pixmaps in this OSD.
Definition at line 748 of file include/vdr/osd.h.
References pixmaps.
cPixmapMemory* cOsd::RenderPixmaps | ( | void | ) | [protected] |
Renders the dirty part of all pixmaps into a resulting pixmap that shall be displayed on the OSD.
The returned pixmap's view port is set to the location of the rectangle on the OSD that needs to be refreshed; its draw port's origin is at (0, 0), and it has the same size as the view port. If there are several non-overlapping dirty rectangles from different pixmaps, they are returned separately in order to avoid re-rendering large parts of the OSD that haven't changed at all. The caller must therefore call RenderPixmaps() repeatedly until it returns NULL, and display the returned parts of the OSD at their appropriate locations. During this entire operation the caller must hold a lock on the cPixmap mutex (for instance by putting a LOCK_PIXMAPS into the scope of the operation). If there are no dirty pixmaps, or if this is not a true color OSD, this function returns NULL. The caller must delete the returned pixmap after use.
cPixmapMemory * cOsd::RenderPixmaps | ( | void | ) | [protected] |
Renders the dirty part of all pixmaps into a resulting pixmap that shall be displayed on the OSD.
The returned pixmap's view port is set to the location of the rectangle on the OSD that needs to be refreshed; its draw port's origin is at (0, 0), and it has the same size as the view port. If there are several non-overlapping dirty rectangles from different pixmaps, they are returned separately in order to avoid re-rendering large parts of the OSD that haven't changed at all. The caller must therefore call RenderPixmaps() repeatedly until it returns NULL, and display the returned parts of the OSD at their appropriate locations. During this entire operation the caller must hold a lock on the cPixmap mutex (for instance by putting a LOCK_PIXMAPS into the scope of the operation). If there are no dirty pixmaps, or if this is not a true color OSD, this function returns NULL. The caller must delete the returned pixmap after use.
Definition at line 1717 of file osd.c.
References cPixmapMemory::Clear(), cRect::Combine(), cPixmap::DirtyViewPort(), cPixmap::DrawPixmap(), cPixmap::DrawPort(), cPixmapMemory::Fill(), cRect::Intersects(), cRect::IsEmpty(), isTrueColor, cPixmap::Layer(), LOCK_PIXMAPS, MAXPIXMAPLAYERS, numPixmaps, pixmaps, cRect::Point(), cPixmapMemory::Render(), cPixmap::SetClean(), cPoint::Shifted(), and cPixmap::ViewPort().
Referenced by cHdffOsdRaw::Flush().
virtual void cOsd::RestoreRegion | ( | void | ) | [virtual] |
Restores the region previously saved by a call to SaveRegion().
If SaveRegion() has not been called before, nothing will happen.
Reimplemented in cCursesOsd, and cHdffOsd.
void cOsd::RestoreRegion | ( | void | ) | [virtual] |
Restores the region previously saved by a call to SaveRegion().
If SaveRegion() has not been called before, nothing will happen.
Reimplemented in cCursesOsd, and cHdffOsd.
Definition at line 1830 of file osd.c.
References cPixmap::Copy(), DrawBitmap(), cPixmap::DrawPort(), isTrueColor, pixmaps, cRect::Point(), savedBitmap, savedPixmap, cPixmap::ViewPort(), cBitmap::X0(), and cBitmap::Y0().
Referenced by cSkinClassicDisplayChannel::SetMessage(), cSkinSTTNGDisplayChannel::SetMessage(), cSkinCursesDisplayChannel::SetMessage(), cSkinSTTNGDisplayMenu::SetMessage(), cSkinClassicDisplayReplay::SetMessage(), cSkinCursesDisplayReplay::SetMessage(), and cSkinSTTNGDisplayReplay::SetMessage().
virtual void cOsd::SaveRegion | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) | [virtual] |
Saves the region defined by the given coordinates for later restoration through RestoreRegion().
Only one saved region can be active at any given time.
Reimplemented in cCursesOsd, and cHdffOsd.
void cOsd::SaveRegion | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) | [virtual] |
Saves the region defined by the given coordinates for later restoration through RestoreRegion().
Only one saved region can be active at any given time.
Reimplemented in cCursesOsd, and cHdffOsd.
Definition at line 1814 of file osd.c.
References bitmaps, cPixmapMemory::Copy(), cBitmap::DrawBitmap(), isTrueColor, numBitmaps, pixmaps, savedBitmap, savedPixmap, cBitmap::X0(), and cBitmap::Y0().
Referenced by cSkinClassicDisplayChannel::SetMessage(), cSkinSTTNGDisplayChannel::SetMessage(), cSkinCursesDisplayChannel::SetMessage(), cSkinSTTNGDisplayMenu::SetMessage(), cSkinClassicDisplayReplay::SetMessage(), cSkinCursesDisplayReplay::SetMessage(), and cSkinSTTNGDisplayReplay::SetMessage().
virtual void cOsd::SetActive | ( | bool | On | ) | [inline, protected, virtual] |
Sets this OSD to be the active one.
A derived class must call cOsd::SetActive(On).
Reimplemented in cHdffOsdRaw, cHdffOsd, and cDvbSdFfOsd.
Definition at line 745 of file osd.h.
References active.
virtual void cOsd::SetActive | ( | bool | On | ) | [inline, protected, virtual] |
Sets this OSD to be the active one.
A derived class must call cOsd::SetActive(On).
Reimplemented in cHdffOsdRaw, cHdffOsd, and cDvbSdFfOsd.
Definition at line 745 of file include/vdr/osd.h.
References active.
Referenced by cOsdProvider::NewOsd(), and ~cOsd().
void cOsd::SetAntiAliasGranularity | ( | uint | FixedColors, |
uint | BlendColors | ||
) |
Allows the system to optimize utilization of the limited color palette entries when generating blended colors for anti-aliasing.
FixedColors is the maximum number of colors used, and BlendColors is the maximum number of foreground/background color combinations used with anti-aliasing. If this function is not called with useful values, the palette may be filled up with many shades of a single color combination, and may not be able to serve all requested colors. By default the palette assumes there will be 10 fixed colors and 10 color combinations. If this is a true color OSD, this function does nothing.
void cOsd::SetAntiAliasGranularity | ( | uint | FixedColors, |
uint | BlendColors | ||
) |
Allows the system to optimize utilization of the limited color palette entries when generating blended colors for anti-aliasing.
FixedColors is the maximum number of colors used, and BlendColors is the maximum number of foreground/background color combinations used with anti-aliasing. If this function is not called with useful values, the palette may be filled up with many shades of a single color combination, and may not be able to serve all requested colors. By default the palette assumes there will be 10 fixed colors and 10 color combinations. If this is a true color OSD, this function does nothing.
Definition at line 1658 of file osd.c.
References bitmaps, isTrueColor, and numBitmaps.
eOsdError cOsd::SetAreas | ( | const tArea * | Areas, |
int | NumAreas | ||
) | [virtual] |
Sets the sub-areas to the given areas.
The return value indicates whether the operation was successful. If an error is reported, nothing will have changed and the previous OSD (if any) will still be displayed as before. If the OSD has been divided into several sub-areas, all areas that are part of the rectangle that surrounds a given drawing operation will be drawn into, with the proper offsets. A new call overwrites any previous settings To set up a true color OSD, exactly one area must be requested, with its coordinates set to the full area the OSD shall cover, and the bpp value set to 32.
Reimplemented in cHdffOsdRaw, cHdffOsd, and cDvbSdFfOsd.
Definition at line 1786 of file osd.c.
References bitmaps, tArea::bpp, CanHandleAreas(), cPixmap::Clear(), CreatePixmap(), esyslog, height, Height(), isTrueColor, max(), numBitmaps, oeOk, oeUnknown, OsdErrorTexts, width, Width(), tArea::x1, tArea::x2, tArea::y1, and tArea::y2.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cDvbSpuDecoder::Draw(), cDvbSubtitleBitmaps::Draw(), cLineGame::Show(), and cTrueColorDemo::Show().
virtual eOsdError cOsd::SetAreas | ( | const tArea * | Areas, |
int | NumAreas | ||
) | [virtual] |
Sets the sub-areas to the given areas.
The return value indicates whether the operation was successful. If an error is reported, nothing will have changed and the previous OSD (if any) will still be displayed as before. If the OSD has been divided into several sub-areas, all areas that are part of the rectangle that surrounds a given drawing operation will be drawn into, with the proper offsets. A new call overwrites any previous settings To set up a true color OSD, exactly one area must be requested, with its coordinates set to the full area the OSD shall cover, and the bpp value set to 32.
Reimplemented in cHdffOsdRaw, cHdffOsd, and cDvbSdFfOsd.
static void cOsd::SetOsdPosition | ( | int | Left, |
int | Top, | ||
int | Width, | ||
int | Height | ||
) | [static] |
Sets the position and size of the OSD to the given values.
This may be useful for plugins that determine the scaling of the video image and need to scale the OSD accordingly to fit on the screen.
void cOsd::SetOsdPosition | ( | int | Left, |
int | Top, | ||
int | Width, | ||
int | Height | ||
) | [static] |
Sets the position and size of the OSD to the given values.
This may be useful for plugins that determine the scaling of the video image and need to scale the OSD accordingly to fit on the screen.
Definition at line 1650 of file osd.c.
References constrain(), Left(), MAXOSDHEIGHT, MAXOSDWIDTH, MINOSDHEIGHT, MINOSDWIDTH, osdHeight, osdLeft, osdTop, osdWidth, and Top().
eOsdError cOsd::SetPalette | ( | const cPalette & | Palette, |
int | Area | ||
) | [virtual] |
Sets the Palette for the given Area (the first area is numbered 0).
If this is a true color OSD, nothing happens and oeOk is returned.
Definition at line 1848 of file osd.c.
References bitmaps, isTrueColor, numBitmaps, oeOk, oeUnknown, and cPalette::Take().
virtual eOsdError cOsd::SetPalette | ( | const cPalette & | Palette, |
int | Area | ||
) | [virtual] |
Sets the Palette for the given Area (the first area is numbered 0).
If this is a true color OSD, nothing happens and oeOk is returned.
int cOsd::Top | ( | void | ) | [inline] |
Definition at line 792 of file include/vdr/osd.h.
References top.
Referenced by cHdffOsd::cHdffOsd(), cOsd(), cDvbSdFfOsd::Flush(), cHdffOsdRaw::Flush(), and SetOsdPosition().
int cOsd::Width | ( | void | ) | [inline] |
int cOsd::Width | ( | void | ) | [inline] |
Definition at line 793 of file include/vdr/osd.h.
References width.
Referenced by cTrueColorDemo::Action(), cDvbSdFfOsd::CanHandleAreas(), cTrueColorDemo::CreateTextPixmap(), cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cDvbSdFfOsd::Flush(), cSkinClassicDisplayChannel::Flush(), SetAreas(), cSkinClassicDisplayChannel::SetChannel(), cSkinClassicDisplayChannel::SetEvents(), cSkinClassicDisplayChannel::SetMessage(), cSkinClassicDisplayVolume::SetVolume(), and cTrueColorDemo::Show().
cOsdProvider [friend] |
Definition at line 708 of file include/vdr/osd.h.
bool cOsd::active [private] |
Definition at line 722 of file include/vdr/osd.h.
Referenced by Active(), cOsd(), and SetActive().
cBitmap * cOsd::bitmaps [private] |
Definition at line 715 of file include/vdr/osd.h.
Referenced by DrawBitmap(), DrawEllipse(), DrawPixel(), DrawRectangle(), DrawSlope(), DrawText(), GetBitmap(), SaveRegion(), SetAntiAliasGranularity(), SetAreas(), SetPalette(), and ~cOsd().
int cOsd::height [private] |
Definition at line 720 of file include/vdr/osd.h.
Referenced by cOsd(), cHdffOsdRaw::Flush(), Height(), and SetAreas().
bool cOsd::isTrueColor [private] |
Definition at line 713 of file include/vdr/osd.h.
Referenced by cOsd(), CreatePixmap(), DestroyPixmap(), DrawBitmap(), DrawEllipse(), DrawImage(), DrawPixel(), DrawRectangle(), DrawSlope(), DrawText(), GetBitmap(), IsTrueColor(), RenderPixmaps(), RestoreRegion(), SaveRegion(), SetAntiAliasGranularity(), SetAreas(), and SetPalette().
int cOsd::left [private] |
Definition at line 720 of file include/vdr/osd.h.
uint cOsd::level [private] |
Definition at line 721 of file include/vdr/osd.h.
Referenced by cOsd().
static cMutex cOsd::mutex [static, private] |
Definition at line 712 of file include/vdr/osd.h.
int cOsd::numBitmaps [private] |
Definition at line 716 of file include/vdr/osd.h.
Referenced by cOsd(), DrawBitmap(), DrawEllipse(), DrawPixel(), DrawRectangle(), DrawSlope(), DrawText(), GetBitmap(), SaveRegion(), SetAntiAliasGranularity(), SetAreas(), SetPalette(), and ~cOsd().
int cOsd::numPixmaps [private] |
Definition at line 719 of file include/vdr/osd.h.
Referenced by AddPixmap(), cOsd(), DestroyPixmap(), NumPixmaps(), RenderPixmaps(), and ~cOsd().
static int cOsd::osdHeight = 0 [static, private] |
Definition at line 710 of file include/vdr/osd.h.
Referenced by OsdHeight(), and SetOsdPosition().
static int cOsd::osdLeft = 0 [static, private] |
Definition at line 710 of file include/vdr/osd.h.
Referenced by OsdLeft(), and SetOsdPosition().
static cVector< cOsd * > cOsd::Osds [static, private] |
Definition at line 711 of file include/vdr/osd.h.
static int cOsd::osdTop = 0 [static, private] |
Definition at line 710 of file include/vdr/osd.h.
Referenced by OsdTop(), and SetOsdPosition().
static int cOsd::osdWidth = 0 [static, private] |
Definition at line 710 of file include/vdr/osd.h.
Referenced by OsdWidth(), and SetOsdPosition().
cPixmap * cOsd::pixmaps [private] |
Definition at line 718 of file include/vdr/osd.h.
Referenced by AddPixmap(), DestroyPixmap(), DrawBitmap(), DrawEllipse(), DrawImage(), DrawPixel(), DrawRectangle(), DrawSlope(), DrawText(), Pixmaps(), RenderPixmaps(), RestoreRegion(), SaveRegion(), and ~cOsd().
cBitmap * cOsd::savedBitmap [private] |
Definition at line 714 of file include/vdr/osd.h.
Referenced by cOsd(), RestoreRegion(), SaveRegion(), and ~cOsd().
cPixmapMemory * cOsd::savedPixmap [private] |
Definition at line 717 of file include/vdr/osd.h.
Referenced by cOsd(), RestoreRegion(), SaveRegion(), and ~cOsd().
int cOsd::top [private] |
Definition at line 720 of file include/vdr/osd.h.
int cOsd::width [private] |
Definition at line 720 of file include/vdr/osd.h.
Referenced by cOsd(), cHdffOsdRaw::Flush(), SetAreas(), and Width().