pub unsafe extern "C" fn OH_Drawing_ShaderEffectCreateRadialGradient(
centerPt: *const OH_Drawing_Point,
radius: f32,
colors: *const u32,
pos: *const f32,
size: u32,
tileMode: OH_Drawing_TileMode,
) -> *mut OH_Drawing_ShaderEffectExpand description
@brief Creates an OH_Drawing_ShaderEffect object that generates a radial gradient based on the center and radius of a circle. The radial gradient transitions colors from the center to the ending shape in a radial manner. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either centerPt or colors is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If tileMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
@param centerPt Center of the circle. @param radius Radius of the gradient. The value should be a non-negative number. @param colors Colors to distribute in the radial direction. @param pos Relative position of each color in the color array. The array length must be the same as that of *colors *. If pos is NULL, colors are evenly distributed in the radial direction. @param size Number of colors and positions (if pos is not NULL). @param tileMode Tile mode of the shader effect. For details about the available options, see {@link OH_Drawing_TileMode} . @return Returns the pointer to the OH_Drawing_ShaderEffect object created. @since 11 @version 1.0