vdr  1.7.27
Public Member Functions | Protected Member Functions | Private Attributes
cHdffOsdRaw Class Reference

List of all members.

Public Member Functions

 cHdffOsdRaw (int Left, int Top, HDFF::cHdffCmdIf *pHdffCmdIf, uint Level)
virtual ~cHdffOsdRaw ()
virtual eOsdError CanHandleAreas (const tArea *Areas, int NumAreas)
virtual eOsdError SetAreas (const tArea *Areas, int NumAreas)
virtual void Flush (void)

Protected Member Functions

virtual void SetActive (bool On)

Private Attributes

HDFF::cHdffCmdIfmHdffCmdIf
int mDispWidth
int mDispHeight
bool refresh
uint32_t mDisplay
uint32_t mBitmapPalette
uint32_t mBitmapColors [256]
uint32_t mBitmapNumColors

Detailed Description

Definition at line 549 of file hdffosd.c.


Constructor & Destructor Documentation

cHdffOsdRaw::cHdffOsdRaw ( int  Left,
int  Top,
HDFF::cHdffCmdIf pHdffCmdIf,
uint  Level 
)

Member Function Documentation

eOsdError cHdffOsdRaw::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 from cOsd.

Definition at line 635 of file hdffosd.c.

References gHdffSetup, oeBppNotSupported, oeOk, and cHdffSetup::TrueColorOsd.

void cHdffOsdRaw::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 from cOsd.

Definition at line 665 of file hdffosd.c.

References cOsd::Active(), cBitmap::Clean(), HDFF::cHdffCmdIf::CmdOsdCreatePalette(), HDFF::cHdffCmdIf::CmdOsdDrawBitmap(), HDFF::cHdffCmdIf::CmdOsdRenderDisplay(), HDFF::cHdffCmdIf::CmdOsdSetPaletteColors(), cPalette::Colors(), cBitmap::Data(), cBitmap::Dirty(), cOsd::GetBitmap(), HDFF_COLOR_FORMAT_ARGB, HDFF_COLOR_TYPE_ARGB8888, HDFF_COLOR_TYPE_CLUT8, HDFF_INVALID_HANDLE, cBitmap::Height(), cOsd::height, cOsd::IsTrueColor(), cOsd::Left(), LOCK_PIXMAPS, MAX_BITMAP_SIZE, mBitmapColors, mBitmapPalette, mDisplay, mHdffCmdIf, refresh, cOsd::RenderPixmaps(), cOsd::Top(), cBitmap::Width(), cOsd::width, cBitmap::X0(), and cBitmap::Y0().

Referenced by SetActive().

void cHdffOsdRaw::SetActive ( bool  On) [protected, virtual]
eOsdError cHdffOsdRaw::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 from cOsd.

Definition at line 650 of file hdffosd.c.

References HDFF::cHdffCmdIf::CmdOsdDrawRectangle(), HDFF::cHdffCmdIf::CmdOsdRenderDisplay(), HDFF_INVALID_HANDLE, mDispHeight, mDisplay, mDispWidth, mHdffCmdIf, and refresh.


Member Data Documentation

uint32_t cHdffOsdRaw::mBitmapColors[256] [private]

Definition at line 558 of file hdffosd.c.

Referenced by Flush().

uint32_t cHdffOsdRaw::mBitmapNumColors [private]

Definition at line 559 of file hdffosd.c.

uint32_t cHdffOsdRaw::mBitmapPalette [private]

Definition at line 557 of file hdffosd.c.

Referenced by cHdffOsdRaw(), Flush(), SetActive(), and ~cHdffOsdRaw().

int cHdffOsdRaw::mDispHeight [private]

Definition at line 554 of file hdffosd.c.

Referenced by cHdffOsdRaw(), SetActive(), SetAreas(), and ~cHdffOsdRaw().

uint32_t cHdffOsdRaw::mDisplay [private]

Definition at line 556 of file hdffosd.c.

Referenced by cHdffOsdRaw(), Flush(), SetActive(), SetAreas(), and ~cHdffOsdRaw().

int cHdffOsdRaw::mDispWidth [private]

Definition at line 553 of file hdffosd.c.

Referenced by cHdffOsdRaw(), SetActive(), SetAreas(), and ~cHdffOsdRaw().

Definition at line 552 of file hdffosd.c.

Referenced by cHdffOsdRaw(), Flush(), SetActive(), SetAreas(), and ~cHdffOsdRaw().

bool cHdffOsdRaw::refresh [private]

Definition at line 555 of file hdffosd.c.

Referenced by cHdffOsdRaw(), Flush(), SetActive(), and SetAreas().


The documentation for this class was generated from the following file: