Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
110
As = As * Agbl;
Ad = As;
if
((mode & MML_GDC_DISP_BLEND_SOURCE_ALPHA) == MML_GDC_DISP_BLEND_SOURCE_ALPHA)
Ad = Ad * Asrc;
if
((mode&MML_GDC_DISP_BLEND_SOURCE_MULTIPLY_ALPHA)==MML_GDC_DISP_BLEND_SOURCE_MUL
TIPLY_ALPHA)
As = As * Asrc;
Cout = Csrc * As + Cdst * (1 - Ad);
Note:
The blend mode settings of the window does not becomes active immediately with the related
mmlGdcDispWinSetBlendMode call, but will be queued together with other settings of this window. Use
mmlGdcDispWinCommit to submit these settings for processing.
Transparency is not supported for the YUV format.
If blend mode MML_GDC_DISP_BLEND_TRANSPARENCY is selected, set transparency color by
mmlGdcDispWinSetAttribute with attribute MML_GDC_DISP_WIN_ATTR_COLOR.
If blend mode MML_GDC_DISP_BLEND_GLOBAL_ALPHA is selected, set global alpha ratio by
mmlGdcDispWinSetAttribute with attribute MML_GDC_DISP_WIN_ATTR_COLOR.
If the matrix set to the window (see mmlGdcDispWinSetMatrix()) is with a scaler factor, then only blend
modeMML_GDC_DISP_BLEND_NONE and MML_GDC_DISP_BLEND_GLOBAL_ALPHA are allowed.
Parameters
in
win
An MML_GDC_DISP_WINDOW returned from a previous call to mmlGdcDispWinCreate.
in
blend_mode
Blend mode related parameter can be a bit field combination of:
MML_GDC_DISP_BLEND_NONE = Disable blending.
MML_GDC_DISP_BLEND_TRANSPARENCY = Enable transparency.
MML_GDC_DISP_BLEND_GLOBAL_ALPHA = Enable global alpha blending.
MML_GDC_DISP_BLEND_SOURCE_ALPHA = Enable per pixel source alpha blending.
MML_GDC_DISP_BLEND_SOURCE_MULTIPLY_ALPHA = Enable source alpha
multiplication.
The color components RR, GG, BB are always 8 bit values also for 16 bpp and indexed
color modes. For instance 0x00ffffff disable the 0xffff color entry in a 16 bpp buffer. The
default blend mode is MML_GDC_DISP_BLEND_NONE.
Return values
MML_OK
On success.
MML_ERR_GDC_DISP_INVALID_ARG
If an invalid argument was passed.
11.5.5.14 MM_ERROR mmlGdcDispWinSetMatrix ( MML_GDC_DISP_WINDOW win, MM_U32
target, const MM_FLOAT
∗
matrix )
Set transformation matrix on window color buffer and/or the extern alpha buffer for scaling, rotation and flipping. The
formula for the transformation based on this matrix is:
xout = matrix[0] * x + matrix[2] * y + matrix[4]
yout = matrix[1] * x + matrix[3] * y + matrix[5]
If matrix = NULL, following data is set in transformation matrix:
�
matrix[0] matrix[2] matrix[4]
matrix[1] matrix[3] matrix[5]
�
=
�
1 0 0
0 1 0
�