Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
185
11.19.3.6 MM_ERROR utSurfReadBitmap ( MML_GDC_SURFACE surface, void
∗∗
pImage, MM_U32
∗
baseAddr, MM_U32
∗
clutAddr )
Read a bitmap structure in memory and set the related surface attributes Please note the surface object must be
created before. No memory will be allocated in this function. The pImage pointer will be increased by the size of the
whole image so it points to the next image object if further images are in the memory block.
Parameters
in
surface
The surface object
in
pImage
address of the pointer to the image
in
baseAddr
Pointer to get color buffer virtual base address
in
clutAddr
Pointer to get clut buffer virtual base address
Return values
MML_OK
on success, otherwise the related error code.
11.19.3.7 MM_ERROR utSurfSetPixel ( MML_GDC_SURFACE src, MM_U32 x, MM_U32 y,
MM_U08 r, MM_U08 g, MM_U08 b, MM_U08 a )
Set the r, g, b, a pixel data of a surface at position x, y The pixel with the coordinates 0, 0 is the upper, left pixel
analoge to the the memory organisation of the memory buffer. Please note that this is different to the glReadPixels
specification. Please note not all possible surface formates are supported.
Parameters
in
src
The surface object
in
x
x positon of the pixel
in
y
y positon of the pixel
in
r
New red value
in
g
New green value
in
b
New blue value
in
a
New alpha value
Return values
MML_OK
on success, otherwise the related error code.
11.19.3.8 MM_S32 utSurfWidth ( MML_GDC_SURFACE surf )
Return the width of a given surface object
Parameters
in
surf
The surface object
Return values
Width
of the surface.