![]() |
MHEG5
22.11.0
|
Graphics functions required by the HD MHEG5 engine. All references to colour used in these functions can be one of three formats: More...
Go to the source code of this file.
Functions | |
void | STB_OSDMhegSetPalette (U16BIT index, U16BIT number, const U32BIT *argb) |
Sets Colour Palette array of up to 256 values, for single byte colour depth. This palette being an array of 'U32BIT' (8 Alpha, 8 Red, 8 Green, 8 Blue). More... | |
void * | STB_OSDMhegSetResolution (U16BIT width, U16BIT height, U8BIT bits) |
Sets the size of the OSD to be used by MHEG engine. The return must be a surface handle for the entire screen back-buffer. The Engine will draw to the surface using STB_OSDMhegBlitStretch, which would be equivalent to it using STB_OSDMhegBlitBitmap() without stretching. More... | |
void * | STB_OSDMhegCreateSurface (U16BIT width, U16BIT height, BOOLEAN init, U32BIT colour) |
Creates a hardware surface on which MHEG5 engine will draw an individual MHEG object. At its basic the function can just allocate the buffer to be returned by STB_OSDMhegLockBuffer(). It's size being: (width * height * bytes_per_pixel) Also, when 'init' is TRUE, function initialises surface buffer to the specified colour. For pixel colour format of less than four bytes, use least significant bits of 'colour'. More... | |
void * | STB_OSDMhegLockBuffer (void *surface, U32BIT *pPitch) |
Converts hardware surface handle returned by STB_OSDMhegCreateSurface() to buffer address that the engine needs in order to draw the MHEG object. This function can inform HW that the engine needs write access to buffer. MHEG5 will use the return address and 'pitch' (or stride) value to locate pixel data. Before calling this function, 'pitch' is initialised to width as given by STB_OSDMhegCreateSurface(), but platform can alter this here. More... | |
void | STB_OSDMhegUnlockBuffer (void *surface) |
This function informs HW that MHEG5 is finished writing to the buffer. More... | |
void | STB_OSDMhegDestroySurface (void *surface) |
This function destroys surface and all data allocated by STB_OSDMhegCreateSurface() More... | |
void | STB_OSDMhegBlitBitmap (void *surface, S_RECTANGLE *pRect, U32BIT pitch, U16BIT screen_x, U16BIT screen_y, E_BLIT_OP bflg) |
Render bitmap on OSD back buffer in the given screen location, with given operation. The bitmap is referenced 'surface' - a handle returned by STB_OSDMhegCreateSurface() More... | |
void | STB_OSDMhegFillRectangle (S_RECTANGLE *pRect, U32BIT colour, E_BLIT_OP bflg) |
Draw a filled rectangle on OSD back buffer in the location given. Where pixel colour is less than four bytes, use least significant bits in 'colour'. 'rect' can be part of the screen or the entire screen. More... | |
void | STB_OSDMhegBlitStretch (S_RECTANGLE *pSrcRect, void *src_surf, S_RECTANGLE *pDstRect, void *dst_surf, E_BLIT_OP bflg) |
Stretch blit bitmap data from source surface to destination surface using source and destination rectangles. When 'dst_surf' is handle returned by STB_OSDMhegSetResolution(), and rectangles are same size, this function is equivalent to STB_OSDMhegBlitBitmap. More... | |
void | STB_OSDMhegFillSurface (void *surface, S_RECTANGLE *pRect, U32BIT colour, E_BLIT_OP bflg) |
Draw a filled rectangle on surface in the location given. Where pixel colour is less than four bytes, use least significant bits in 'colour'. More... | |
void | STB_OSDMhegUpdate (void) |
Commit OSD changes to the screen - changes given by previous calls to STB_OSDMhegDrawRectangle() and STB_OSDMhegDrawBitmap(). More... | |
void | STB_OSDMhegClear (void) |
Clear MHEG's entire OSD. | |
Graphics functions required by the HD MHEG5 engine. All references to colour used in these functions can be one of three formats:
void STB_OSDMhegBlitBitmap | ( | void * | surface, |
S_RECTANGLE * | pRect, | ||
U32BIT | pitch, | ||
U16BIT | screen_x, | ||
U16BIT | screen_y, | ||
E_BLIT_OP | bflg | ||
) |
Render bitmap on OSD back buffer in the given screen location, with given operation. The bitmap is referenced 'surface' - a handle returned by STB_OSDMhegCreateSurface()
surface | Handle of surface returned by STB_OSDMhegCreateSurface |
rect | source rectangle within surface - top/left is offset into bitmap referenced by 'surface', width/height gives size. |
pitch | Width of line of source bitmap data - as returned by STB_OSDMhegLockBuffer() |
screen_x | Left or X position on screen to draw bitmap |
screen_y | Top or Y position on screen to draw bitmap |
bflg | Operation - COPY or ALPHA BLEND |
void STB_OSDMhegBlitStretch | ( | S_RECTANGLE * | pSrcRect, |
void * | src_surf, | ||
S_RECTANGLE * | pDstRect, | ||
void * | dst_surf, | ||
E_BLIT_OP | bflg | ||
) |
Stretch blit bitmap data from source surface to destination surface using source and destination rectangles. When 'dst_surf' is handle returned by STB_OSDMhegSetResolution(), and rectangles are same size, this function is equivalent to STB_OSDMhegBlitBitmap.
pSrcRect | rectangle for bitmap data |
src_surf | handle returned by STB_OSDMhegCreateSurface |
pDstRect | rectangle for destination on surface |
dst_surf | handle returned by STB_OSDMhegCreateSurface or STB_OSDMhegSetResolution |
bflg | Operation - COPY or ALPHA BLEND |
void* STB_OSDMhegCreateSurface | ( | U16BIT | width, |
U16BIT | height, | ||
BOOLEAN | init, | ||
U32BIT | colour | ||
) |
Creates a hardware surface on which MHEG5 engine will draw an individual MHEG object. At its basic the function can just allocate the buffer to be returned by STB_OSDMhegLockBuffer(). It's size being: (width * height * bytes_per_pixel) Also, when 'init' is TRUE, function initialises surface buffer to the specified colour. For pixel colour format of less than four bytes, use least significant bits of 'colour'.
width | Width of requested surface in pixels |
height | Height of requested surface in pixels |
init | If TRUE, initialise buffer with colour. |
colour | colour for all pixels in buffer. |
void STB_OSDMhegDestroySurface | ( | void * | surface | ) |
This function destroys surface and all data allocated by STB_OSDMhegCreateSurface()
surface | Handle of surface returned by STB_OSDMhegCreateSurface |
void STB_OSDMhegFillRectangle | ( | S_RECTANGLE * | pRect, |
U32BIT | colour, | ||
E_BLIT_OP | bflg | ||
) |
Draw a filled rectangle on OSD back buffer in the location given. Where pixel colour is less than four bytes, use least significant bits in 'colour'. 'rect' can be part of the screen or the entire screen.
rect | rectangle on screen - with top,left starting position |
colour | colour for all pixels in rectangle. |
bflg | Operation - COPY or ALPHA BLEND |
void STB_OSDMhegFillSurface | ( | void * | surface, |
S_RECTANGLE * | pRect, | ||
U32BIT | colour, | ||
E_BLIT_OP | bflg | ||
) |
Draw a filled rectangle on surface in the location given. Where pixel colour is less than four bytes, use least significant bits in 'colour'.
surface | handle returned by STB_OSDMhegCreateSurface |
rect | rectangle on screen - with top,left starting position |
colour | colour for all pixels in rectangle. |
bflg | Operation - COPY or ALPHA BLEND |
void* STB_OSDMhegLockBuffer | ( | void * | surface, |
U32BIT * | pPitch | ||
) |
Converts hardware surface handle returned by STB_OSDMhegCreateSurface() to buffer address that the engine needs in order to draw the MHEG object. This function can inform HW that the engine needs write access to buffer. MHEG5 will use the return address and 'pitch' (or stride) value to locate pixel data. Before calling this function, 'pitch' is initialised to width as given by STB_OSDMhegCreateSurface(), but platform can alter this here.
surface | Handle of surface returned by STB_OSDMhegCreateSurface |
pitch | width in bytes of one line of pixel data in buffer |
void STB_OSDMhegSetPalette | ( | U16BIT | index, |
U16BIT | number, | ||
const U32BIT * | argb | ||
) |
Sets Colour Palette array of up to 256 values, for single byte colour depth. This palette being an array of 'U32BIT' (8 Alpha, 8 Red, 8 Green, 8 Blue).
index | |
number | Size of palette array |
argb | pointer to palette array |
void* STB_OSDMhegSetResolution | ( | U16BIT | width, |
U16BIT | height, | ||
U8BIT | bits | ||
) |
Sets the size of the OSD to be used by MHEG engine. The return must be a surface handle for the entire screen back-buffer. The Engine will draw to the surface using STB_OSDMhegBlitStretch, which would be equivalent to it using STB_OSDMhegBlitBitmap() without stretching.
width | Width of MHEG OSD resolution |
height | Height of MHEG OSD resolution |
bits | Number of bits per pixel |
void STB_OSDMhegUnlockBuffer | ( | void * | surface | ) |
This function informs HW that MHEG5 is finished writing to the buffer.
surface | Handle of surface returned by STB_OSDMhegCreateSurface |
void STB_OSDMhegUpdate | ( | void | ) |
Commit OSD changes to the screen - changes given by previous calls to STB_OSDMhegDrawRectangle() and STB_OSDMhegDrawBitmap().