diff options
author | zwer <zwer@1f4bef6d-8e0a-0410-8695-e467da8aaccf> | 2006-05-07 22:33:35 +0000 |
---|---|---|
committer | zwer <zwer@1f4bef6d-8e0a-0410-8695-e467da8aaccf> | 2006-05-07 22:33:35 +0000 |
commit | 4523b067ff0c54132b4a3a385e4a1b21b19b6443 (patch) | |
tree | e918a1a6e097660ac9670bfda33ba83856428dd8 /netosd.c | |
parent | 49577f08861642c39d1490d5e156c9624133e9f4 (diff) | |
download | vdr-plugin-ffnetdev-4523b067ff0c54132b4a3a385e4a1b21b19b6443.tar.gz vdr-plugin-ffnetdev-4523b067ff0c54132b4a3a385e4a1b21b19b6443.tar.bz2 |
- add multi area OSD support. You can use all plugins and all skins.
git-svn-id: svn://svn.berlios.de/ffnetdev/trunk@16 1f4bef6d-8e0a-0410-8695-e467da8aaccf
Diffstat (limited to 'netosd.c')
-rw-r--r-- | netosd.c | 23 |
1 files changed, 10 insertions, 13 deletions
@@ -29,8 +29,8 @@ eOsdError cNetOSD::CanHandleAreas(const tArea *Areas, int NumAreas) { eOsdError Result = cOsd::CanHandleAreas(Areas, NumAreas); if (Result == oeOk) { - if (NumAreas > 1) // Handle only one big area (because we support VNC colour map mode) - return oeTooManyAreas; // We cannot handle multiple areas having different colour maps. We need a single colourmap. Thus, only one area. + if (NumAreas > 7) + return oeTooManyAreas; int TotalMemory = 0; for (int i = 0; i < NumAreas; i++) { if (Areas[i].bpp != 1 && Areas[i].bpp != 2 && Areas[i].bpp != 4 && Areas[i].bpp != 8) @@ -48,31 +48,28 @@ eOsdError cNetOSD::CanHandleAreas(const tArea *Areas, int NumAreas) return Result; } + void cNetOSD::Flush(void) { cBitmap *Bitmap; + int x1=0, x2=0, y1=0, y2=0; for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) - { - int x1=0, x2=0, y1=0, y2=0; + { if (Bitmap->Dirty(x1, y1, x2, y2)) { - // commit colors: - int NumColors; - const tColor *Colors = Bitmap->Colors(NumColors); - if (Colors) { - cOSDWorker::SendCMAP(NumColors , Colors); - } #ifdef DEBUG fprintf(stderr, "[ffnetdev] NetOSD: Left: %d, Top: %d, X0: %d, Y0: %d, Width: %d, Height: %d\n", Left(), Top(), Bitmap->X0(), Bitmap->Y0(), Bitmap->Width(), Bitmap->Height()); fprintf(stderr, "[ffnetdev] NetOSD: Dirty area x1: %d, y1: %d, x2: %d, y2: %d\n",x1,y1,x2,y2); #endif - // commit modified data: - cOSDWorker::SendScreen(Bitmap->Width(), Left()+x1 +Bitmap->X0(), Top()+y1+Bitmap->Y0(), x2-x1+1, y2-y1+1, Bitmap->Data(x1, y1)); + cOSDWorker::DrawBitmap(Left() + Bitmap->X0(), Top() + Bitmap->Y0(), *Bitmap); + } Bitmap->Clean(); - } + } + + cOSDWorker::SendScreen(); } |