All Osd Function Documentation
TAP_Osd_Create
Topfield Documentation
int TAP_Osd_Create(dword x, dword y, dword w, dword h, byte lutIdx, int flag);
It creates a region.
- x, y : starting position of the region. (upper, left)
- w, h : the width and height of the region.
- lutIdx : The LUT number used in the region. LUT is assigned by TAP_Osd_SetLut().
- flag : Osd creation flag.
return value : region number of created region or
0xFFFF in case of error (no region available)
flag | comment |
---|
OSD_Flag_MemRgn | make virtual region in memory instead of screen |
OSD_Flag_256 | make 256 color region. default is 16bit color |
OSD_Flag_Plane2 | make region in Plane2 instead of Plane1 |
Additional Documentation
Region created for plane 2 (OSD_Flag_Plane2) is below the normal region i.e:
rgn1 = TAP_Osd_Create(0, 0, 720, 576, 0, 0);
rgn2 = TAP_Osd_Create(0, 0, 720, 576, 0, OSD_Flag_Plane2);
TAP_Osd_FillBox(rgn1, 100, 100, 100, 100, COLOR_Red);
TAP_Osd_FillBox(rgn2, 150, 150, 100, 100, COLOR_Green);
draws a red box into screen and green box below the red one (in a places where the boxes overlap).
Please note that plane 2 does not work very well in TF5100PVRc (Sep 12 2005 firmware) because after using plane 2 and if you press the next key sequence:
Guide -> RED key -> P+ the EPG screen is flushed totally and only the PIP figure can be seen (until the EPG data is updated!).
LUT = Look-Up Table
TAP_Osd_Delete
Topfield Documentation
int TAP_Osd_Delete(word rgn);
It deletes the region.
Additional Documentation
TAP_Osd_Move
Topfield Documentation
int TAP_Osd_Move(word rgn, dword x, dword y);
It moves the region to the new position.
Additional Documentation
TAP_Osd_FillBox
Topfield Documentation
int TAP_Osd_FillBox(word rgn, dword x, dword y, dword w, dword h, dword color);
It draws the filled box with the assigned color.
Additional Documentation
TAP_Osd_SetLut
Topfield Documentation
int TAP_Osd_SetLut(byte lutIdx, byte lut[][4]);
It assigns the Color LUT.
- lutIdx : LUT Index
- lut : the start address of LUT contents
return value : If 0, it is successful. Else, there is an error.
CAUTION : The size of lut must be 256*4.
Additional Documentation
LUT = Look-Up Table
TAP_Osd_SetTransparency
Topfield Documentation
int TAP_Osd_SetTransparency(word rgn, char rt);
It sets the transparency level of a region.
- rt : transparency level between 0 to 63
return value : If 0, it is successful. Else, there is an error.
CAUTION : In TF5000PVR, you cannot set each transparency in the individual region. Only the total transparency can be changed with this function.
Additional Documentation
Contrary to the Topfield documentation, valid values are in the range 0 to 255, with 255 being completely opaque. If you change the transparency level, remember to set the original value back. Next is an example of how to do it:
// Save original transparency level (APP start) int tr_orig = TAP_GetSystemVar( SYSVAR_OsdAlpha );
// Change transparency level … TAP_Osd_SetTransparency( rgn, 150 );
// Return original transparency level (APP exit) TAP_Osd_SetTransparency( rgn, 0xFF - tr_orig );
EMJB: The reference to "TF5000" appears to refer to the TF5000-series, including the TF5800.
TAP_Osd_DrawRectangle
Topfield Documentation
int TAP_Osd_DrawRectangle(word rgn, dword x, dword y, dword w, dword h, dword t, dword color);
It draws a rectangle.
Additional Documentation
EMJB: x, y, w, h define the outside dimensions of the rectangle, and t defines the thickness of the line (all in pixels)
TAP_Osd_DrawPixmap
Topfield Documentation
int TAP_Osd_DrawPixmap(word rgn, dword x, dword y, dword w, dword h, void *pixmap, bool sprite, byte dataFormat);
It draws a 16bit (32768 color) or 8bit (256 color) pixel image.
- pixmap : the start address of image data
- sprite : FALSE - All pixel data will be drawn on the region. TRUE - The pixel data with color index 0 will not be drawn on the region.
- dataFormat : pixel data format ( OSD_1555 or OSD_256 )
return value : If 0, it is successful. Else, there is an error.
Additional Documentation
TAP_Osd_PutGd
Topfield Documentation
int TAP_Osd_PutGd(word rgn, int x, int y, TYPE_GrData * gd, bool sprite);
It displays the pixel data that compressed with TYPE_GrData type. This data type can be made using MakeGd.exe. It can compress 70% approximately The MakeGd.exe will be released at the next time.
- gd : pixel data of TYPE_GrData type
- sprite : FALSE - All pixel data will be drawn on the region. TRUE - The pixel data with color index 0 will not be drawn on the region.
dataFormat : pixel data format ( OSD_1555 or OSD_256 )
return value : If 0, it is successful. Else, there is an error.
CAUTION : The member pointer of structure should not be initialized in the declaration part. So, you have to make the sub-routine that initializes TYPE_GrData and member of this structure. (Please refer to Logo.c in sample source codes)
Additional Documentation
TAP_Osd_Copy
Topfield Documentation
int TAP_Osd_Copy(word srcRgnNum, word dstRgnNum, dword srcX, dword srcY, dword w, dword h, dword dstX, dword dstY, bool sprite);
It copies some portion of a region to other region or to any other position in the same region.
- srcRgnNum : the index of source region
- dstRgnNum : the index of destination region
- srcX : the start position in X coordinate of source to be copied
- srcY : the start position in Y coordinate of source to be copied
- dstX : the start position in X coordinate of destination to copy
- dstY : the start position in Y coordinate of destination to copy
- sprite : FALSE - All pixel data will be drawn on the region. TRUE - The pixel data with color index 0 will not be drawn on the region.
Additional Documentation
TAP_Osd_SaveBox
Topfield Documentation
byte* TAP_Osd_SaveBox(word rgn, dword x, dword y, dword w, dword h);
It saves some portion of a region to memory.
return value : the start address of memory to save. The memory SHOULD be freed after using it with
TAP_MemFree().
Additional Documentation
TAP_Osd_RestoreBox
Topfield Documentation
void TAP_Osd_RestoreBox(word rgn, dword x, dword y, dword w, dword h, void *data);
It displays the data to the specified position. The data can be saved by the function
TAP_Osd_SaveBox().
Additional Documentation
TAP_Osd_GetPixel
Topfield Documentation
int TAP_Osd_GetPixel(word rgn, dword x, dword y, void *pix);
It reads the pixel value.
Additional Documentation
Topfield MasterPiece TF5100PVRc
FW: TF-NNCPCf 1.52 (Oct 05 2005)
TAP API: 1.22
TAP_Osd_GetPixel( word rgn, dword x, dword y, void *pix );
Pixel goes high part of argument void *pix
Example:
dword pix;
TAP_Osd_GetPixel( rgn, x, y, &pix);
pix = pix >> 16; // Need to shift: rgb-pixel goes high
TAP_Osd_PutPixel( rgn, x, y, pix);
TAP_Osd_PutPixel
Topfield Documentation
int TAP_Osd_PutPixel(word rgn, dword x, dword y, dword pix);
It writes the pixel value.
Additional Documentation
TAP_SysOsdControl
Topfield Documentation
void TAP_SysOsdControl(TYPE_TapSysOsdId osdId, bool ctrl);
It controls the system OSD such as infobox, volume bar, PVR info bar and service status bar.
- osdld : ID number of the specific system OSD object.
- 0 : SYSOSD_InfoBox Information Box
- 1 : SYSOSD_PvrInfo PVR Information Bar
- 2 : SYSOSD_VolumeBar Volume Bar
- 3 : SYSOSD_ServiceStatus Service Status Bar
- ctrl : TRUE = show, FALSE = hide
Additional Documentation