Blit enumerations
This section gives details on blit enumerations.
vg_lite_blend_t
enumeration
This enumeration defines the blending modes supported by some VGLite API functions. S and D represent source and destination non-premultiplied RGB color channels. Sa and Da represent the source and destination alpha channels. SP and DP represent source and destination alpha-premultiplied RGB color channels (SP = S*Sa, DP = D*Da).
Note: VG_LITE_BLEND_*_LVGL
modes are supported on all VG cores. On VG cores that do not support gcFEATURE_BIT_VG_LVGL_SUPPORT
, the LVGL blend modes are supported by a combination of software and hardware operations. OPENVG_BLEND_*
modes can only be supported on GC355 and GC555 cores.
Used in blit functions: vg_lite_blit, vg_lite_blit2, vg_lite_blit_rect.
Used in draw functions: vg_lite_draw, vg_lite_draw_grad, vg_lite_draw_radial_grad, vg_lite_draw_pattern
.
vg_lite_blend_t String Values |
Description |
---|---|
VG_LITE_BLEND_NONE |
S, no blending Non-premultiplied |
VG_LITE_BLEND_SRC_OVER |
S + D * (1 - Sa) Non-premultiplied |
VG_LITE_BLEND_DST_OVER |
S * (1 – Da) + D Non-premultiplied |
VG_LITE_BLEND_SRC_IN |
S * Da Non-premultiplied |
VG_LITE_BLEND_DST_IN |
D * Sa Non-premultiplied |
VG_LITE_BLEND_MULTIPLY |
S * (1 - Da) + D * (1 - Sa) + S * D Non-premultiplied |
VG_LITE_BLEND_SCREEN |
S + D - S * D Non-premultiplied |
VG_LITE_BLEND_DARKEN |
min(SRC_OVER, DST_OVER) Non-premultiplied |
VG_LITE_BLEND_LIGHTEN |
max(SRC_OVER, DST_OVER) Non-premultiplied |
VG_LITE_BLEND_ADDITIVE |
S + D Non-premultiplied |
VG_LITE_BLEND_SUBTRACT |
D * (1 - Sa) Non-premultiplied |
VG_LITE_BLEND_NORMAL_LVGL |
S * Sa + D * (1 - Sa) Non-premultiplied (from March 2023) |
VG_LITE_BLEND_ADDITIVE_LVGL |
(S + D) * Sa + D * (1 - Sa) Non-premultiplied (from March 2023) |
VG_LITE_BLEND_SUBTRACT_LVGL |
(S - D) * Sa + D * (1 - Sa) Non-premultiplied (from March 2023) |
VG_LITE_BLEND_MULTIPLY_LVGL |
(S * D) * Sa + D * (1 - Sa) Non-premultiplied (from March 2023) |
OpenVG Porter-Duff Blend String Values |
(from Aug 2023) |
OPENVG_BLEND_NONE |
SP, no blending Premultiplied |
OPENVG_BLEND_SRC_OVER |
(SP + DP * (1 - Sa)) / (Sa + Da * (1 - Sa)) Premultiplied |
OPENVG_BLEND_DST_OVER |
(SP * (1 - Da) + DP) / (Sa * (1 - Da) + Da) Premultiplied |
OPENVG_BLEND_SRC_IN |
(SP * Da) / (Sa * Da) Premultiplied |
OPENVG_BLEND_DST_IN |
(DP * Sa) / (Sa * Da) Premultiplied |
OPENVG_BLEND_MULTIPLY |
(SP*DP + SP*(1 - Da) + DP*(1 - Sa)) / (Sa + Da*(1 - Sa)) Premultiplied |
OPENVG_BLEND_SCREEN |
(SP + DP - (SP*DP)) / (Sa + Da*(1 - Sa)) Premultiplied |
OPENVG_BLEND_DARKEN |
min(SRC_OVER, DST_OVER) Premultiplied |
OPENVG_BLEND_LIGHTEN |
max(SRC_OVER, DST_OVER) Premultiplied |
OPENVG_BLEND_ADDITIVE |
(SP + DP) / (Sa + Da) Premultiplied |
Parent topic:Blit enumerations
vg_lite_color_t
parameter
The common parameter vg_lite_color_t
is described in Table 1.
Parent topic:Blit enumerations
vg_lite_color_transform_t
structure
Specifies the pixel color_transform values for scale and bias.
Used in functions: vg_lite_set_color_transform
.
vg_lite_color_transform_t members |
Type |
Description |
---|---|---|
|
|
Scale value for alpha. |
|
|
Bias value for alpha. |
|
|
Scale value for red. |
|
|
Bias value for red. |
|
|
Scale value for green. |
|
|
Bias value for green. |
|
|
Scale value for blue. |
|
|
Bias value for blue. |
Parent topic:Blit enumerations
vg_lite_filter_t
enumeration
Specifies the sample-filtering mode in VGLite blit and draw APIs.
Used in blit functions: vg_lite_blit
, vg_lite_blit_rect
.
Used in draw functions: vg_lite_draw_radial_gradient
, vg_lite_draw_pattern
.
vg_lite_filter_t string values |
Description |
---|---|
|
Fetch only the nearest image pixel |
|
Use linear interpolation along a horizontal line |
|
Use a 2x2 box around the image pixel and perform an interpolation |
|
Perform 3x3 gaussian blur with the convolution for image pixel. (from March 2023) |
Parent topic:Blit enumerations
vg_lite_color_transform_t
structure
Specifies the pixel color_transform values for scale and bias.
Used in functions: vg_lite_set_color_transform
.
vg_lite_color_transform_t members |
Type |
Description |
---|---|---|
|
|
Scale value for alpha. |
|
|
Bias value for alpha. |
|
|
Scale value for red. |
|
|
Bias value for red. |
|
|
Scale value for green. |
|
|
Bias value for green. |
|
|
Scale value for blue. |
|
|
Bias value for blue. |
Parent topic:Blit enumerations
vg_lite_mask_operation_t
enumeration
Specifies the mask operation mode in VGLite blit APIs.
Used in functions: vg_lite_blend_masklayer, vg_lite_render_masklayer.
vg_lite_mask_operation_t string values |
Description |
---|---|
|
This operation sets all mask values in the region of interest to 0, ignoring the new mask layer. |
|
This operation sets all mask values in the region of interest to 1, ignoring the new mask layer. |
|
This operation copies values in the region of interest from the new mask layer, overwriting the previous mask values. |
|
This operation replaces the previous mask in the region of interest by its union with the new mask layer. The resulting values are always greater than or equal to their previous value. |
|
This operation replaces the previous mask in the region of interest by its intersection with the new mask layer. The resulting mask values are always less than or equal to their previous value. |
|
This operation subtracts the new mask from the previous mask and replaces the previous mask in the region of interest by the resulting mask. The resulting values are always less than or equal to their previous value. |
Parent topic:Blit enumerations
vg_lite_orientation_t
enumeration
Specifies the mirror orientation in VGLite blit APIs.
Used in functions: vg_lite_set_mirror.
vg_lite_orientation_t string values |
Description |
---|---|
|
Target output orientation is from top to bottom (default). |
|
Target output orientation is from bottom to top. |
Parent topic:Blit enumerations
vg_lite_param_type_t
enumeration
Specifies the parameter type in VGLite blit APIs.
Used in functions: vg_lite_get_parameter.
vg_lite_param_type_t string value |
Description |
---|---|
|
The count must be 1 for GPU idle state TRUE or FALSE. |
|
The count must be 4n for x, y, right, bottom. |
Parent topic:Blit enumerations
Parent topic:Blits for compositing and blending