Radial gradient functions initialization and control functions
The following functions are available only with IP that supports radial gradients, such as GC355 and GC555. These functions are not available with GCNanoLiteV, or GCNanoUltraV or GCNanoV.
Note: There is no init function required for radial gradients. Buffer initialization is done through the vg_lite_update_radial_grad
function. (from Nov 2020, requires GC355 or GC555 hardware)
vg_lite_set_radial_grad function
Description:
This function is used to set the values for the radial linear gradient definition. (from November 2020, requires GC355 or GC555 hardware)
Syntax:
vg_lite_error_t vg_lite_set_radial_grad (
vg_lite_radial_gradient_t *grad,
vg_lite_uint32_t count,
vg_lite_color_ramp_t *color_ramp,
vg_lite_radial_gradient_parameter_t grad_param,
vg_lite_radial_gradient_spreadmode_t spread_mode,
vg_lite_uint8_t pre_mult
);
Parameters:
Parameter |
Description |
---|---|
|
Pointer to the vg_lite_radial_gradient_t structure for the radial gradient that has to be set |
|
The number of color stops in the gradient. The maximum color stop count is defined by |
|
Pointer to the vg_lite_color_ramp_t structure that defines the stops for the radial gradient. The five parameters provide the offset and color for each stop. Each stop is defined by a set of floating point values that specify the offset and the sRGBA color and alpha values. Color channel values are in the form of a non-premultiplied (R, G, B, alpha) quad. All parameters are in the range of [0,1]. The red, green, blue, alpha value of [0, 1] is mapped to an 8-bit pixel value [0, 255]. |
|
The radial gradient parameters are supplied as a vector of 5 floats. Parameters (cx, cy) specify the center point, parameters (fx, fy) specify the focal point, and r specifies the radius. See structure vg_lite_radial_gradient_parameter_t. |
|
The tiling mode that is applied to pixels out of the paint after transformation. See enum vg_lite_radial_gradient_spreadmode_t. |
|
Controls whether color and alpha values are interpolated in premultiplied or non-premultiplied form. If this value is set to 1, the color value of |
Returns:
Returns VG_LITE_INVALID_ARGUMENTS
to indicate that the parameters are wrong.
Parent topic:Radial gradient functions initialization and control functions
vg_lite_update_radial_grad
function
Description:
This function is used to update or generate values for an image object that is going to be rendered. The vg_lite_radial_gradient_t object has an image buffer that is used to render the gradient pattern. The image buffer will be created or updated with the corresponding gradient parameters. (from November 2020, requires GC355 or GC555 hardware)
Syntax:
vg_lite_error_t vg_lite_update_radial_grad (
vg_lite_radial_gradient_t *grad,
);
Parameters:
Parameter |
Description |
---|---|
|
Pointer to the vg_lite_radial_gradient_t structure, which contains the updated values to be used for the object to be rendered |
Returns:
Returns VG_LITE_SUCCESS
if successful. See vg_lite_error_t enum for other return codes.
Parent topic:Radial gradient functions initialization and control functions
vg_lite_get_radial_grad_matrix
function
Description:
This function is used to get a pointer to the radial gradient object’s transformation matrix. This allows an application to manipulate the matrix to facilitate correct rendering of the gradient path*. (from Nov 2020, requires GC355 or GC555 hardware).*
Syntax:
vg_lite_error_t vg_lite_get_radial_grad_matrix (
vg_lite_radial_gradient_t *grad,
);
Parameters:
Parameter |
Description |
---|---|
|
Pointer to the vg_lite_radial_gradient_t structure, which contains the matrix to be retrieved |
Returns:
Returns VG_LITE_SUCCESS
if successful. See vg_lite_error_t enum for other return codes.
Parent topic:Radial gradient functions initialization and control functions
vg_lite_clear_rad_grad
function
Description:
This function is used to clear the values of a radial gradient object and free the image buffer’s memory*. (from Nov 2020, requires GC355 or GC555 hardware)*
Syntax:
vg_lite_error_t vg_lite_clear_radial_grad (
vg_lite_radial_gradient_t *grad,
);
Parameters:
Parameter |
Description |
---|---|
|
Pointer to the vg_lite_radial_gradient_t structure which is to be cleared |
Returns:
Returns VG_LITE_SUCCESS
if successful. See vg_lite_error_t enum for other return codes.
Parent topic:Radial gradient functions initialization and control functions
Parent topic:Vector-dased draw operations