pub unsafe extern "C" fn OH_Drawing_ShaderEffectCreateTwoPointConicalGradient(
startPt: *const OH_Drawing_Point2D,
startRadius: f32,
endPt: *const OH_Drawing_Point2D,
endRadius: f32,
colors: *const u32,
pos: *const f32,
size: u32,
tileMode: OH_Drawing_TileMode,
matrix: *const OH_Drawing_Matrix,
) -> *mut OH_Drawing_ShaderEffectExpand description
@brief Creates an OH_Drawing_ShaderEffect object that generates a gradient between two given circles. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of startPt, endPt, and 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 startPt Pointer to the center of the start circle. @param startRadius Start radius of the gradient. The value should be a non-negative number. @param endPt Pointer to the center of the end circle. @param endRadius End radius of the gradient. The value should be a non-negative number. @param colors Colors to distribute between the two circles. @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 between the two circles. @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} . @param matrix Matrix applied on the shader effect. If matrix is NULL, an identity matrix is applied by default. @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created. If the returned pointer is NULL, the creation fails. The possible causes are as follows:
- The available memory is empty.
- startPt, endPt, or colors is NULL.
- The value of tileMode is out of the enumerated value range. @since 12 @version 1.0